Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Alppa on January 03, 2013, 03:16:53 PM

Title: 2d jump + air Controller
Post by: Alppa on January 03, 2013, 03:16:53 PM
Hi guys im new here and i try to make 2d game. So far i have make a movement and jump work whit playmaker. But i dont know how i make it move Horizontal in Air while jumping?  ???

If someone know plz help :) Thank you
Title: Re: 2d jump + air Controller
Post by: kiriri on January 03, 2013, 04:16:50 PM
That depends on how your fsm and controller is set up. Can you give us more details like what kind of controller you use (rigidbody, character controller etc...), how you handle input (Your FSM), how you make your character move and jump(your FSM(s) ), those kinds of things.
I'm sure we can help you then :)
Title: Re: 2d jump + air Controller
Post by: Alppa on January 03, 2013, 04:48:53 PM
Here is 2 image! Maby this help.
Title: Re: 2d jump + air Controller
Post by: kiriri on January 03, 2013, 05:01:24 PM
this is a very unusual setup. Most people use one FSM to get buttons etc, and then send events to other FSMs accordingly. But yours should be possible too.
Like, you could put the actions from the jump state into your main state. Then replace the GetButtonDown action with a GetButton action.
That action will make the bool True if the button is pressed, and false if it isn't. So if you use it to set the Bool you use in the SetProperty action for jump, and make both of them work every frame, it should work, shouldn't it?
Title: Re: 2d jump + air Controller
Post by: Dev_Sebas on January 03, 2013, 05:03:42 PM
Hi Alppa
Why in you Jump state you are setting a property? Do you have a script to make your jump?

I think you cloud make your jump only with PlayMaker.

1-You just need to make a new vector3 variable. (0,2,0) * adjust the number 2 for an good value for you.
2-In jump state add "Controller Move" action.
3-In action "Controller Move" set move vector with your new vector3.
4-In jump state add "Wait" action. Set time to a good value for you. Finish event set "finished", and add finished transition going to your state "Movement/Setup".
That´s it.
Cheers
Title: Re: 2d jump + air Controller
Post by: Alppa on January 03, 2013, 05:41:39 PM
Sebastião i make it work but when i press jump button the Player shake couple of time then it jump.

kiriri it didint work :(

I made it jump somehow but how can i make it move in air?
Sorry guys im new here and playmaker is new to me. I have lots of question  ???
Title: Re: 2d jump + air Controller
Post by: jeanfabre on January 04, 2013, 02:51:47 AM
Hi,

 Study the platform jumper example, it can do just that, jumping and still have control to move it around.

https://hutonggames.fogbugz.com/default.asp?W890 (https://hutonggames.fogbugz.com/default.asp?W890)

bye,

 Jean