playMaker

Author Topic: Jump and Run at the same time  (Read 5330 times)

SofianeJad

  • Playmaker Newbie
  • *
  • Posts: 6
Jump and Run at the same time
« on: July 09, 2017, 02:51:14 PM »
Hi everyone, so i started to use Playmaker 1.8.3 and unity 5.6.2f1 so i created three buttons: right, left and a jump button and i used a Touch Object 2d Event and a separated movement and jumping FSM.
So it's working fine, i can move left and right and jump, but when the character walk and i press the jump button nothing happens.
Can anyone give me some advise to optimise my 2d game.

Thanks.

Bye

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Jump and Run at the same time
« Reply #1 on: July 10, 2017, 09:38:14 AM »
Hi,
Do you have the Touch Object 2d Event for all buttons in a single fsm?
If so you should have them separately as they can't not be called simultaneously.

If this is not the case, can you give some more info on how you have set this up (Pictures/video)

SofianeJad

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Jump and Run at the same time
« Reply #2 on: July 11, 2017, 12:17:27 PM »
Hi djaydino, thanks for your answer,
No i don't have the Touch Object 2d Event for all buttons in a single fsm, the movement buttons have they own FSM and the jump button has it owns to.
I think that the finger Id has something to do with that problem, i can't tap at the movement button and the jump button at the same time.

This is a screenshot of the jump FSM:
https://ibb.co/fjkNfF

This is a screenshot of the movement FSM:
https://ibb.co/eUxzua

Thanks,
Bye.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Jump and Run at the same time
« Reply #3 on: July 11, 2017, 10:42:24 PM »
Hi,
On the jump FSM, set finger id to 'none'

If you don't need the finger id for something else you can also set 'Store Finger Id' to 'none'

SofianeJad

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Jump and Run at the same time
« Reply #4 on: July 13, 2017, 10:26:34 AM »
Hi,
I changed the Finger Id to "none" but still not working   :-[

Should i mention that i use the movement FSM and the jumping FSM at the same object: Player!
Any ways, thanks for your REPLY.
Have a good day.

SofianeJad

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Jump and Run at the same time
« Reply #5 on: July 13, 2017, 12:30:19 PM »
Hi again,
maybe i found the problem but i don't know how to resolve it.
when i place the jumping button in the bottom right of the screen and it enter in collision with another box ccollider 2d object (platform) the player can't jump and move at the same time.
But when i place the jump button in the middle of the screen or in an empty space it works perfect and i can jump and move at the same time.
I hope the community can help me.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Jump and Run at the same time
« Reply #6 on: July 14, 2017, 11:37:16 AM »
Hi,
I think it is better to make the controls in unity UI.

I made a Video Explaining how to do this :


SofianeJad

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Jump and Run at the same time
« Reply #7 on: July 15, 2017, 10:35:05 AM »
Hi,
Thanks for the video, I really appreciate that you made one to explain how to use UGui in unity.
But the problem still the same, i can't run and jump at the same time. Anyways, thanks alot.
  :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Jump and Run at the same time
« Reply #8 on: July 15, 2017, 11:08:29 AM »
Hi,
Can you make some pictures/video of your fsm/states/actions?

SofianeJad

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Jump and Run at the same time
« Reply #9 on: July 16, 2017, 11:15:18 AM »
Hi,
I am pretty sure that the problem is not from the playmaker

The jumping FSM:
http://www.superfunctions.com/jump.gif

The movement FSM:
http://www.superfunctions.com/move.gif

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Jump and Run at the same time
« Reply #10 on: July 16, 2017, 12:09:41 PM »
Hi,
Maybe the tutorial on this topic can help you out :)