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

Controlling the Standing animation with LUA

  • #1, by F_Kal 9 years ago Zitieren
    I've been trying via LUA to manipulate (start, stop and reverse) the standing animations of a NPC Character's default outfit, but it seems I cannot achieve this; I can easily get other Character Animations to work just fine though - but it seems as if standing animations in particular don't respond to startAnimation, stopAnimation - is this so indeed? or am I doing something wrong?

    Thank you!


  • #2, by afrlme 9 years ago Zitieren
    I've been trying via LUA to manipulate (start, stop and reverse) the standing animations of a NPC Character's default outfit, but it seems I cannot achieve this; I can easily get other Character Animations to work just fine though - but it seems as if standing animations in particular don't respond to startAnimation, stopAnimation - is this so indeed? or am I doing something wrong?

    Thank you!


    Idle, walk, talk & random character animations are controlled by the engine. The only character animations you can start/stop are the manually started "character animations".

  • #3, by F_Kal 9 years ago Zitieren
    aha, thought so!
    Glad to hear that! 
    Thanks again AFRLme
  • #4, by afrlme 9 years ago Zitieren
    aha, thought so!
    Glad to hear that! 
    Thanks again AFRLme
    No problem mate. That's not to say you can't force which frames should be played or if they should be played forward or backwards. It's possible to control that with Lua script.

    Anyway, yeah. Just thought I'd point out that it's Lua & not LUA. Basically means "moon" in Portuguese. That's another thing you can count towards whatever else you've learned the day. wink

    P.S: Pendulum_Animation_(h2) -- might find this useful as well.
  • #5, by F_Kal 9 years ago Zitieren
    yesss, the pendulum tutorial! It's turned into a permanent-resident-tab on my mac these days!

    PS. mind.push("Lua, not LUA");
  • #6, by darren-beckett 9 years ago Zitieren
    Once the standing animations are active, you can manipulate the start/finish frames of the animation like this:
    local fAnim = getObject("ActiveAnimations[Standing01]")
    
    fAnim.AnimationFirstFrame = 10
    fAnim.AnimationLastFrame = 30
    I have certain frames within my standing animations that call a function to decide on what the next sequence of frames should be, this allows for the charcater to have random idle animations.


  • #7, by afrlme 9 years ago Zitieren
    @ darren-beckett: thanks for reminding me. I also controlled the animation frames in idle animations to add dynamic blinking to the idle animations. Here's a tutorial I created for it a while back based on what I did for ALLD demo.