Controlling the Standing animation with LUA

  • #1, z F_KalThursday, 16. March 2017, 21:07 hodinky 8 years ago
    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!


    Fanoušek fóra

    107 Posts


  • #2, z afrlmeThursday, 16. March 2017, 21:14 hodinky 8 years ago
    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".

    Imperátor

    7285 Posts

  • #3, z F_KalThursday, 16. March 2017, 21:34 hodinky 8 years ago
    aha, thought so!
    Glad to hear that! 
    Thanks again AFRLme

    Fanoušek fóra

    107 Posts

  • #4, z afrlmeThursday, 16. March 2017, 23:03 hodinky 8 years ago
    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.

    Imperátor

    7285 Posts

  • #5, z F_KalFriday, 17. March 2017, 03:54 hodinky 8 years ago
    yesss, the pendulum tutorial! It's turned into a permanent-resident-tab on my mac these days!

    PS. mind.push("Lua, not LUA");

    Fanoušek fóra

    107 Posts

  • #6, z darren-beckettFriday, 17. March 2017, 10:55 hodinky 8 years ago
    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.


    Čestný člen

    384 Posts

  • #7, z afrlmeFriday, 17. March 2017, 12:21 hodinky 8 years ago
    @ 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.

    Imperátor

    7285 Posts