Synching sinchronised animations.

  • #10, by ke4Wednesday, 08. June 2016, 17:00 5 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
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23

    Key Killer

    810 Posts


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

    Forum Fan

    120 Posts

  • #12, by afrlmeWednesday, 08. June 2016, 17:08 5 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

    Imperator

    7005 Posts

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

    Key Killer

    810 Posts

  • #14, by bananeisafreeWednesday, 08. June 2016, 19:17 5 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

    Forum Fan

    120 Posts

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

    Imperator

    7005 Posts