playMaker

Author Topic: FSM State Issues (SOLVED)  (Read 311 times)

Rispetto

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
FSM State Issues (SOLVED)
« on: February 08, 2018, 11:53:28 AM »
Hello!

I'm pretty new to Playmaker.

I'm having an issue transitioning between states.

My setup is pretty simple:



If you press D, the state changes to Walking_Right

If you press A, the state changes to Walking_Left

However you can't activate Walking_Left if it is below Walking_Right in the "State" menu. It won't even light up green in the State menu. If I swap which state comes first, then the other one won't work.



What am I doing wrong here?

I want the state to recognize ANY key input, then switch states based on what key was pressed.

edit: As the hint suggests:

"Action Sequences executes each action in turn. When one action finishes the next action starts."

How do I get it to check for any action sequence?

edit2: SOLVED!

Press the little gear icon on the top right of the state window and DE-SELECT "Action Sequence", this makes it recognize any of the states in the list at any time.
« Last Edit: February 08, 2018, 02:28:57 PM by Rispetto »

antibob

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
    • BillsClass
Re: FSM State Issues
« Reply #1 on: February 08, 2018, 12:59:51 PM »
You can use Get Key action which results in a bool (true/false if pressed/not pressed). You can then bool test.

You could also add a Get Key Down on the Walking_Right state and listed for the A key to be pressed and send it directly to Walking_left.

Rispetto

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: FSM State Issues
« Reply #2 on: February 08, 2018, 02:13:50 PM »
I'm not sure if I'm following you correctly, but;

You can use Get Key action which results in a bool (true/false if pressed/not pressed). You can then bool test.

This is what I'm already doing -- you can see this in the second image from the OP.

If D is pressed down, then it changes states to Walking_Right.

If A is pressed down, then it changes states to Walking_Left.

However the state will only recognize whichever key check is placed first. Almost like it's waiting for D to be pressed before it'll even check for A. I want it to fire in event any key is pressed.

You could also add a Get Key Down on the Walking_Right state and listed for the A key to be pressed and send it directly to Walking_left.

Would this not mean that the player would have to press D before being allowed to press A? I want the player to be able to press any key from the idle state, and have it move in the direction correlated to that key.
« Last Edit: February 08, 2018, 02:16:05 PM by Rispetto »

utopien

  • Playmaker Newbie
  • *
  • Posts: 37
    • View Profile
Re: FSM State Issues (SOLVED)
« Reply #3 on: February 09, 2018, 08:10:53 AM »
hi first your halt state is usless  you need to be able to do it from walk.... leeft or right you need on thos state a key up who bring you back To idle  this why cant activate the other side walk...... and Ket down to the other side To