playMaker

Author Topic: How to make a controller jump and move  (Read 3236 times)

ayzhong

  • Playmaker Newbie
  • *
  • Posts: 2
How to make a controller jump and move
« on: July 15, 2011, 06:16:22 PM »
Alright, i have a simple problem that is stumping me. I have a capsule with a character controller attached. I wish to make the character capsule move left and right and jump whenever it comes in contact with the ground. So I created two FSM's. The first one consists of only one state with two actions: get axis (horizontal) and a controller simple move action. At first, with only that one FSM, everything worked perfectly. The capsule moved left and right correctly. But then i created a second FSM to make the capsule jump. I have two states: one that checks if the capsule is grounded and the other with a controller move action to make the capsule jump. once i added the second FSM, the capsule jumped when it touched the ground but would not move left and right. suggestions?
any help would be greatly appreciated.

thanks in advance :D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to make a controller jump and move
« Reply #1 on: July 16, 2011, 09:34:14 AM »
Hi,

 I think that's because you have two similar controller, one is overriding the other. If you disable on Fsm and the other one works and vice veras this is likely the issue.


Have one controller, and from that action, poll values from the second Fsm or have the second Fsm maintain variables in the first Fsm setting the variable directly.

So one Fsm only deal with the get axis and feed these values into a second Fsm with the controller that deals with the jump as well. You could even make the jump behavior independent in its own Fsm, and have Fsm with only the controller.

Hope it make sense.

Bye,

 Jean

ayzhong

  • Playmaker Newbie
  • *
  • Posts: 2
Re: How to make a controller jump and move
« Reply #2 on: July 26, 2011, 05:31:58 PM »
Thanks for the help, and I'm certain that what you're saying is correct, but I can't seem to implement. My new setup is this: The controller still has two FSM's. The first has one state that detects input and stores it in a float. The second FSM takes the float from the first FSM and uses it in a Controller simple move to move left and right. But I still can't seem to implement the jump and i can't move the controller when it is in mid-air.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to make a controller jump and move
« Reply #3 on: July 27, 2011, 02:44:50 AM »
Hi,


 I am not I can help any further without looking at the project itself. pm me if you can share the project and I'll happily look at your issue and work on a solution with you that we can then share back on this thread.

 Bye,

 Jean