playMaker

Author Topic: 2d jump + air Controller  (Read 4296 times)

Alppa

  • Playmaker Newbie
  • *
  • Posts: 8
2d jump + air Controller
« 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

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: 2d jump + air Controller
« Reply #1 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 :)
Best,
Sven

Alppa

  • Playmaker Newbie
  • *
  • Posts: 8
Re: 2d jump + air Controller
« Reply #2 on: January 03, 2013, 04:48:53 PM »
Here is 2 image! Maby this help.

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: 2d jump + air Controller
« Reply #3 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?
Best,
Sven

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: 2d jump + air Controller
« Reply #4 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

Alppa

  • Playmaker Newbie
  • *
  • Posts: 8
Re: 2d jump + air Controller
« Reply #5 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  ???

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 2d jump + air Controller
« Reply #6 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

bye,

 Jean