Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Stopping character animation while it is looping

  • #1, by fulviov 11 years ago Zitieren
    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

  • #2, by afrlme 11 years ago Zitieren
    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.
  • #3, by fulviov 11 years ago Zitieren
    This works perfectly, thank you. smile