Play anticipation before walking and stop walking too

  • #10, by sebastianMonday, 09. May 2016, 12:02 8 years ago
    I would set the condition to true in the first walking animation frame and false in the first standing animation frame

    Thread Captain

    2346 Posts


  • #11, by GlenfxMonday, 09. May 2016, 12:39 8 years ago
    Hah!!, I feel stupid... anyway, I did it like that but is not working, it keeps looping all the frames while walking :/

    (and yes, I wrote the exact name of the animation in the script).

    Newbie

    72 Posts

  • #12, by afrlmeMonday, 09. May 2016, 13:40 8 years ago
    There's actually a data structure value you can access to determine the state of a character...
    if Characters["Tom"].State == 3 then
     -- character is walking
    else
     -- character is not walking
    end
    

    Personally I'm hoping the devs will implement an hook function into the engine to listen out for when characters start & stop walking as it would simplify scripting walk based features for characters.

    @ Sebastian.204: In theory that would work fine, but you've got to take into consideration that when a character has an object destination that they are probably going to immediately transition from walking to playing a character animation as opposed to reverting instantly back to idle.

    You can create a hook yourself within a loop using what I wrote in the code box above, but it's only good for whichever character you add to it, or iterate through via a table & for loop, which is why I would prefer an hook function being implemented directly into the engine.

    Imperator

    7278 Posts