Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mangledmind on December 28, 2012, 03:57:11 PM

Title: Need help - Idle to walk FSM[SOLVED]
Post 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.
Title: Re: Need help - Idle to walk FSM
Post by: kiriri on December 28, 2012, 04:33:26 PM
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.
Title: Re: Need help - Idle to walk FSM
Post by: Mangledmind on December 28, 2012, 09:47:11 PM
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 =)