Synching sinchronised animations.

  • #10, z ke4Wednesday, 08. June 2016, 17:00 hodinky 9 years ago
    That's what i have in my game. I have hidden inventory, when i'm opening it i'm registering loop and unregistering it on closing the inventory again. I don't really understand the concpet you are mentioning, this is the script i wrote.

    local items
    
    function scaleItem()
    items = game.CurrentCharacter.Items
    for i =1, #items do
    	if game.CurrentObject:getName() == items[i]:getName() then
    		if  ActiveAnimations[items[i]:getName()].AnimationCurrentSpriteIndex < 4 then	
    			setAnimFrames(items[i]:getName(), 1, 5)
    		else
    			setAnimFrames(items[i]:getName(), 5, 5)
    		end
    	else
    		if ActiveAnimations[items[i]:getName()].AnimationCurrentSpriteIndex > 0 then
    			ActiveAnimations[items[i]:getName()].PlayOppositeDirection = true
    			setAnimFrames(items[i]:getName(), 1, 5)	
    		else
    			ActiveAnimations[items[i]:getName()].PlayOppositeDirection = false
    			setAnimFrames(items[i]:getName(), 1, 1)
    		end	
    	end
    end
    end
    

    Zabiják klíčů

    810 Posts


  • #11, z bananeisafreeWednesday, 08. June 2016, 17:04 hodinky 9 years ago
    And i'm so slow at posting that you managed to have an alltogether different conversation ... Feelsbad man!

    Fanoušek fóra

    120 Posts

  • #12, z afrlmeWednesday, 08. June 2016, 17:08 hodinky 9 years ago
    And i'm so slow at posting that you managed to have an alltogether different conversation ... Feelsbad man!


    Don't worry mate... I'm the king of "off-topic-ness" & we often tend to pile on the replies, regardless of whether they are on topic, or not. grin

    Imperátor

    7285 Posts

  • #13, z ke4Wednesday, 08. June 2016, 17:22 hodinky 9 years ago
    grin That's true, the threads often ends up with off topic stuff.

    Zabiják klíčů

    810 Posts

  • #14, z bananeisafreeWednesday, 08. June 2016, 19:17 hodinky 9 years ago
    I realized that quite a lot actually. Wich is far from a bad thing, as it usualy ends up awnsering questions I never asked myself prior to reading the initial topic. :p

    Fanoušek fóra

    120 Posts

  • #15, z afrlmeWednesday, 08. June 2016, 19:43 hodinky 9 years ago
    That, & a bit of randomness never hurt anyone - or maybe it did & I just don't know about it :shakeshark:

    Imperátor

    7285 Posts