Menu
Login
Language
DE EN FR ES IT CZ
Back

How to play animation on next movement

  • #1, by darren-beckett Tuesday, 16. June 2015, 14:22 11 years ago Quote
    Hi,
    My character walks to a bench, they sit down, the outfit is then changed to the 'Sitting Outfit'.
    How can i now make sure to play the standing up animation before the character starts to walk away?

    Basically, I need to play an animation before the next Interface Walk Action is called.

    Great Poster

    386 Posts

  • #2, by afrlme Tuesday, 16. June 2015, 16:15 11 years ago Quote
    Use an NPC version for the bench part & hide your playable character or send it to another scene. This way the character won't walk. Inside the left click mouse properties or via Lua script you could check if character is sitting / npc or something with an if query then if it is you could determine what it should do, such as: store the destination, play the standing up animation, then swap the npc character for the playable character.

    Imperator

    7290 Posts

  • #3, by darren-beckett Wednesday, 17. June 2015, 14:29 11 years ago Quote
    I cannot get this to work.
    I'm using a coin interface and therefore do not have a left click for the Walk command, i have the Walk command set as my standard command.

    Great Poster

    386 Posts

  • #4, by afrlme Wednesday, 17. June 2015, 15:16 11 years ago Quote
    I meant in the mouse properties tab under the game tab.

    Long story short. Swap out the main character for an NPC character when sitting down. Then swap back to the playable character when they can walk again. There are multiple methods you could use to do this, so I'll leave that up to you to work out how you go about it.

    Imperator

    7290 Posts

  • #5, by darren-beckett Thursday, 18. June 2015, 17:45 11 years ago Quote
    I managed to do this in the Games/Mouse Properties/Left Click event:
    1) Store Cursor Position (curPos = getCursorPos)
    2) Save object
    3) If condition 'SittingDown' Play StandUpAnimation (and wait)
    4) Set command 'Walk'
    5) If object below cursor exists 'Execute command on saved object'
    else Execute char.CharacterDestination = curPos

    Great Poster

    386 Posts

  • #6, by afrlme Thursday, 18. June 2015, 18:02 11 years ago Quote
    Nice one! Glad you got it sorted out. wink

    Imperator

    7290 Posts