Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mangledmind on December 28, 2012, 03:57:11 PM
-
Hello im trying to make an FSM for an Idle to Walk state. at the moment im using a get button down, which triggers when ever the input of Horizontal OR vertical is set, switching to the on state, and the opposite for a get button up.
the problem is that if a player is pressing W and D at the same time (to move diagonally) - if he were to the let the D button up, he would stop moving entirely and go back to the idle stage instead of then only moving straight (since he'd still be holding down the W button)
sorry if this has already been posted / address. but im new here and have yet to see anything about this.
-
well, you can always use a float compare :
(http://img703.imageshack.us/img703/96/axesg.png)
Granted, this does not work if you press A and D at the same time, but nevertheless, it may help. For A and D you need to work with booleans, at least that's how I do it.
-
Thanks that looks good, but can you please explain the "go" transition? idk how to send state 3 back to state 6 as youve shown in ur FSM diagram.
EDIT: nvm i got it working, had to setup Go as a global translation. thank you for your help it seems to perfectly =)