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

Play anticipation before walking and stop walking too

  • #10, by sebastian 10 years ago Zitieren
    I would set the condition to true in the first walking animation frame and false in the first standing animation frame
  • #11, by Glenfx 10 years ago Zitieren
    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).
  • #12, by afrlme 10 years ago Zitieren
    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.