Stopping character animation while it is looping

  • #1, by fulviovFriday, 19. June 2015, 03:36 6 years ago
    I have a character in a scene which, when entering the room, is in a "sleeping" infinite looping animation, but when the main character clicks on it, it should stop the sleeping animation and switch to a "wake up" animation.

    I have tried to do this with the hide animation action, the unload animation, and also using lua directly (stopAnimation(Animations['lisa_sleep']) but nothing seems to work.
    The character keeps sleeping forever and the left click to make it switch animation is never registered.

    I also tried to set a fixed number of loops on the sleep animation to see if the infinite loop was the problem, but I got the same result - while the sleep animation is running, I cannot interact with the character and make it stop.
    When the sleep animation is not running, I can start the wake up animation just fine.
    Btw - the animation is set to play without the "wait for animation to finish" flag, but I have tried also with the flag without success.

    Thanks in advance, any hint or help would be really appreciated since I am not really sure what I am doing wrong. :S

    Forum Fan

    119 Posts

  • #2, by afrlmeFriday, 19. June 2015, 11:42 6 years ago
    Create an additional outfit with the character sleeping as the idle animation & the wake up animation inside of the outfits character animations, then swap the outfit back to the default outfit after playing the wakeup animation. Should work ok.


    6983 Posts

  • #3, by fulviovFriday, 19. June 2015, 12:43 6 years ago
    This works perfectly, thank you. smile

    Forum Fan

    119 Posts

Write post