Login / Registrieren
DE EN FR ES IT CZ
Back

Visionaire Studio 4.2.5 Released

  • #60, von tristan-kang Wednesday, 02. December 2015, 15:41 11 years ago
    There are a few Spanish developers on here. Last year a team of Spanish developers tried to kickstart a game called Waldemar the Warlock - I think that is what it was called? Then again my memory is not that great so it could have been you? Anyway... there are a few other developers too.


    http://www.visionaire-studio.net/forum/thread/the-red-hat-po...!!/

    One thing I do like about Spain is that you often get a tapa when you order a drink, which is something you would probably never get in the UK unless you managed to find an actual tapas bar / restaurant. I never saw one where I am from in the UK though.


    There is tapas restaurant near me now but I should pay for each tapas.... lol

    P.P.S: I think VS should have a food category. - joke.


    When VS getting really popular, then the forum should be bigger and categorised suitably.

    After that, it would be great there is sub-forum named 'social life stuffs' thing. smile

    tristan-kang


    Great Poster

    267 Posts

  • #61, von afrlme Wednesday, 02. December 2015, 16:29 11 years ago
    How can we now iterate through all the Characters using Lua?
    Something like this:
    chars = getObject("Game.Characters")
    for c in chars do
    	print("Char: " .. c.CharacterName)
    end
    


    Like this...
    for i = 1, #(Characters) do
     print( Characters[i]:getName() )
    end
    

    You can add characters to a variable too if you prefer. I just showed accessing it without is all.

    afrlme


    Imperator

    7292 Posts

  • #62, von darren-beckett Wednesday, 02. December 2015, 17:32 11 years ago
    for i = 1, #(Characters) do
     print( Characters[i]:getName() )
    end
    


    It doesn't work, #(Characters) = 0
    and as a test #(Fonts) is also zero.

    Any ideas?

    darren-beckett


    Great Poster

    386 Posts

  • #63, von ke4 Wednesday, 02. December 2015, 17:42 11 years ago
    And why the brackets?

    for i = 1, #Characters do
     print( Characters[i]:getName() )
    end
    

    ke4


    Key Killer

    810 Posts

  • #64, von afrlme Wednesday, 02. December 2015, 18:03 11 years ago
    Felt like adding the brackets. Don't have to include them. More of a visual aid than anything else. You also don't have to use the # either can use table.maxn(name) instead.

    It didn't work?

    ah. game.CharacterLinks. I would have thought could access Characters table, but I did write it off the top of my head. I've not tried iterating through characters before as I haven't needed to.

    afrlme


    Imperator

    7292 Posts

  • #65, von darren-beckett Wednesday, 02. December 2015, 18:10 11 years ago
    This works:
    for i = 1, table.maxn(game.CharacterLinks) do
    	print( Characters[i]:getName() )
    end
    

    Thanks for the pointers.

    darren-beckett


    Great Poster

    386 Posts

  • #66, von darren-beckett Wednesday, 02. December 2015, 18:15 11 years ago
    This wont help us iterate through fonts etc though.

    darren-beckett


    Great Poster

    386 Posts

  • #67, von ke4 Wednesday, 02. December 2015, 18:25 11 years ago
    This doesn't work?

    fonts = game.FontLinks
    
    for i = 1, #fonts do
        print( fonts[i]:getName() )
    end
    

    ke4


    Key Killer

    810 Posts

  • #68, von darren-beckett Wednesday, 02. December 2015, 18:34 11 years ago
    Ok, nice one.

    darren-beckett


    Great Poster

    386 Posts

  • #69, von SimonS Wednesday, 02. December 2015, 20:11 11 years ago
    I couldn't override the getn-operator in LuaJIT, because of that you need to do this:

    for i = 1, Fonts.__len do
        print( Fonts[i]:getName() )
    end
    

    SimonS


    Thread Captain

    1623 Posts

  • #70, von afrlme Wednesday, 02. December 2015, 21:27 11 years ago
    Ah, cheers for letting us know why it wouldn't let us access it directly via the global tables. smile

    P.S: the # isn't needed?

    afrlme


    Imperator

    7292 Posts