playMaker

Author Topic: [Solved] Move Left and Jump (Charcter Controller) easier way ?  (Read 2451 times)

slightfx

  • Playmaker Newbie
  • *
  • Posts: 2


Hi.

Just came aboard the playMaker ship. :)
Trying to find the corrent way to make my cube jump while moving left/right
A diagonal jump.

Is this the normal way, or is there a better way?
Best Regards.
« Last Edit: June 09, 2012, 04:12:28 AM by slightfx »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Move Left and Jump (Charcter Controller) easier way ?
« Reply #1 on: June 08, 2012, 06:32:40 AM »
Hi,

 you could avoid duplicating the jump system by putting it in a separate Fsm, and fire an event from this fsm that deals with movement such as "ALLOW JUMP" and "DISALLOW JUMP" and in the fsm responsible for jumping, you simply react to both of these events to effectivly allow for jumping or not.

that way you avoid duplicates. But don't worry, sometimes I do make duplicates, because it would add too much complexity to my system otherwise, but you have to know that duplicates are very bad for maintenance, so try to avoid as much as possible.

 apart from that, don't be afraid of multiple states per Fsm, this is fine, and the way you have it laid out is really good, so you're doing well. Make use of state coloring too, this helps visually organize distinct processes in one Fsm.

Bye,

 Jean

slightfx

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Move Left and Jump (Charcter Controller) easier way ?
« Reply #2 on: June 09, 2012, 04:12:09 AM »
Ahh I see, multiple all so fixed the issue with action bloking when a key is pressed down.
Thx :)