playMaker

Author Topic: More on CharacterMotor and resetting for Jumping  (Read 3066 times)

iPetProjectDev

  • Playmaker Newbie
  • *
  • Posts: 23
More on CharacterMotor and resetting for Jumping
« on: May 24, 2012, 07:31:22 PM »
Hi. I have been dealing with a mystery about the jumpInput boolean of the Character Motor. I am using SimpleMove as per the tutorial video and once I actually understood where to get those "little black boxes" above and had the courage to rip apart the spaghetti of my previous animation switchboard using local transitions I actually got about 70 more FPS using the Global Variables route.

So In use a GetButtonDown and listen for the Jump input. On the first hit of the spacebar I am good to go. I jump the height set and land going in and out of the animation smoothly. However subsequent presses of the space bar do not cause a jump though it activates the same states it did the first time. I have spent since 10 AM shuffling stuff everywhere and trying to find out what little i can from google.. My guess is some flag needs resetting and studying it I noted that any subsequent button presses till .02 seconds after the landing is occurred get ignored so the jump doesn't look buggy. Am I using the correct command with GetButtonDown? I also read that you can't Jump in SimpleMove. Well..I certainly do every time..only once.

To summarize.
1. is GetButtonDown the correct method to fire off Jump commands or is GetButton better?

2. If the GetButtonDown is not the issue then is it a flag I need to reset in Character Motor after the first jump is finished? It is internally setting the isGrounded flag..is it not?

3. Has anybody else gotten a jump from hitting the space bar using SimpleMove as per following the tutorial setup on a consistent basis and if so what was the techniqiue or action set you used.

TIA

iPetProjectDev

  • Playmaker Newbie
  • *
  • Posts: 23
Re: More on CharacterMotor and resetting for Jumping[SOLVED]
« Reply #1 on: May 24, 2012, 10:36:03 PM »
OK.. The trick here was to use the GetKeyDown Store Results field to store the actual bool value name that causes jumping in the CharacterMotor script, which is inputJump. If you set the inputJump in another manner reset it back manually or the jump will not occur a second time.

HTH

copenhagenjazz

  • Playmaker Newbie
  • *
  • Posts: 10
Re: More on CharacterMotor and resetting for Jumping
« Reply #2 on: July 07, 2012, 11:11:02 AM »
Hi there

I am having completely the same issue. Can you elaborate a little on how you solved this issue? Are you saying we need to create a new Variable called "inputJump" or ??

My setup consists of three states; Listener (Get key down) --> Jump (Set property) --> Jump recover (Wait)

If you wouldnt mind explaining step by step what you did to get it moving that would be soo great. Kind of going nuts about this issue :D

Also, can I modify the charactermotor script to expose the jump height? I have made a global jumpheight variable that is higher when the character is running.

Thanks in advance :)