playMaker

Author Topic: Why my character double jumps infinitely  (Read 307 times)

misterjuly

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Why my character double jumps infinitely
« on: October 16, 2020, 03: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

ch1ky3n

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Re: Why my character double jumps infinitely
« Reply #1 on: October 16, 2020, 08: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.

misterjuly

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: Why my character double jumps infinitely
« Reply #2 on: October 17, 2020, 03: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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5546
    • View Profile
    • jinxtergames
Re: Why my character double jumps infinitely
« Reply #3 on: October 17, 2020, 01:32:05 PM »
Hi.
What actions are you using?

misterjuly

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: Why my character double jumps infinitely
« Reply #4 on: October 17, 2020, 05: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!

misterjuly

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: Why my character double jumps infinitely
« Reply #5 on: October 17, 2020, 05: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.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5546
    • View Profile
    • jinxtergames
Re: Why my character double jumps infinitely
« Reply #6 on: October 18, 2020, 12:34:36 AM »
Hi.
your bool test is not set to every frame,
also remove the transition Do jump on the action.

ch1ky3n

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Re: Why my character double jumps infinitely
« Reply #7 on: October 18, 2020, 08: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.

misterjuly

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: Why my character double jumps infinitely
« Reply #8 on: October 18, 2020, 09:09:01 AM »
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

ch1ky3n

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Re: Why my character double jumps infinitely
« Reply #9 on: October 18, 2020, 10:52:03 AM »
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.




misterjuly

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: Why my character double jumps infinitely
« Reply #10 on: October 18, 2020, 01: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.

misterjuly

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: Why my character double jumps infinitely
« Reply #11 on: October 18, 2020, 01:51:30 PM »
And what do you mean by conditions? Sorry, I'm not super familiar with all the vocabulary yet. Thanks!

ch1ky3n

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Re: Why my character double jumps infinitely
« Reply #12 on: October 18, 2020, 08: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