Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: misterjuly on October 16, 2020, 06:27:02 PM

Title: Why my character double jumps infinitely
Post by: misterjuly on October 16, 2020, 06:27:02 PM
Hello,

My character will jump infinitely for some reason. Attached is a screen shot of my FSM. Any help would be appreciated. Thanks!

John Bassi
Title: Re: Why my character double jumps infinitely
Post by: ch1ky3n on October 16, 2020, 11:51:29 PM
hey there

On Check if Landed state, remove the Do Jump event and leave it blank, so it will only trigger when it lands.
Title: Re: Why my character double jumps infinitely
Post by: misterjuly on October 17, 2020, 06:51:15 AM
Now I have a new problem. My character won't jump once he lands on a platform. Not sure if there is another thread for this, but I figured I would ask here since we already starting chatting. Thanks!


John Bassi
Title: Re: Why my character double jumps infinitely
Post by: djaydino on October 17, 2020, 04:32:05 PM
Hi.
What actions are you using?
Title: Re: Why my character double jumps infinitely
Post by: misterjuly on October 17, 2020, 08:39:43 PM
Hi. Here are the actions I'm using. I realize I have an error message, but don't know how to fix that (that might be my problem). Sorry I'm new at this. Thanks!
Title: Re: Why my character double jumps infinitely
Post by: misterjuly on October 17, 2020, 08:43:54 PM
Also, the error goes away when I have the fsm set up the original way, but I have both problems. Wasn't sure if that info would help.
Title: Re: Why my character double jumps infinitely
Post by: djaydino on October 18, 2020, 03:34:36 AM
Hi.
your bool test is not set to every frame,
also remove the transition Do jump on the action.
Title: Re: Why my character double jumps infinitely
Post by: ch1ky3n on October 18, 2020, 11:45:38 AM
Hey just like Djaydino said, remove the DO JUMP event.

Once you remove the transition, you also need to remove the event that triggered it inside the state. In your case, bool event.
Title: Re: Why my character double jumps infinitely
Post by: misterjuly on October 18, 2020, 12:09:01 PM
Well that took care of the double jumping problem. However, still when I land on a platform I cannot jump again. I'm not sure if this info will help, but the platforms I am using are capsule colliders (I am bouncing on balloons, so I though this would make sense). I had this problem periodically when using box colliders too, it just seems more consistent this way. Also, I experimented with the "DO JUMP" action and tried all the other possible options, but that didn't work either. So I just kept it at "None". Also, I might still be doing it wrong, so here's an updated screen shot. Thanks!

John Bassi
Title: Re: Why my character double jumps infinitely
Post by: ch1ky3n on October 18, 2020, 01:52:03 PM
remove the bool action event, since it won't do anything if you removed both conditions. So now, you rely on the trigger of On Collision enter. So, whenever your character collides with the ground, it will send the state back to Wait for Key Down State.

Also whenever you stuck on something (Such as the Can't jump again problem) don't stop your gameplay, instead, check the state and see where your current state landed. This could help u diagnose where the problem lays.



Title: Re: Why my character double jumps infinitely
Post by: misterjuly on October 18, 2020, 04:49:17 PM
It seems like when I remove the bool event, the double jumping problem comes back, but I can jump off platforms. When it is gone, I can't jump off platforms and I still have the double jumping issue. I tried watching the FSM during gameplay, and it seems to get stuck on the check if landed state, with or without the bool. Hopefully that gives you an idea of what the problem is. Sorry I'm having such a hard time figuring this out. Thanks again for your help.
Title: Re: Why my character double jumps infinitely
Post by: misterjuly on October 18, 2020, 04:51:30 PM
And what do you mean by conditions? Sorry, I'm not super familiar with all the vocabulary yet. Thanks!
Title: Re: Why my character double jumps infinitely
Post by: ch1ky3n on October 18, 2020, 11:11:50 PM
in bool you check for 2 conditions

true or false , if true then you snd event DO JUMP, if false then you send event SAY HELLO

by removing DO JUMP and SAY HELLO, it also render the bool test command pointless. that's why i asked u to remove it.

As for infinite jump, is a classic question. try to search this forum, there should be tons of answered question regarding to this