Possible Jumping Solution
scitunes
Member, Sous Chef Posts: 4,047
I have driven myself crazy trying to create a platform game with a player that jumps every time I press the spacebar but doesn't jump in mid air (in other words, doesn't fly). For some reason creating two rules with a accelerate up in the section under the rules doesn't work:
space bar down AND overlapping platform
This worked about 80% of the time and I have no clue why it failed the other 20%.
Here's what has been working 100% of the time so far:
1) Create a game boolean attribute (I called it jump) check that it is true
2) Create a rule that says when player collides with platform change jump attribute to true (1)
3) In your jump rule (make sure it is set to ALL):
-spacebar down (or whatever you are using for the jump key)
-game.jump = 1
-timer (longer the time higher the jump)
-accelerate (90degrees, experiment with speed to your liking)
-THIS IS KEY - change jump attribute to 0
This will make it so that when you leave the ground you cannot jump again until you collide with a platform. As soon as you leave the platform the boolean attribute is set to false (0) and you are then unable to jump again until you land (collide with ground).
So far this has been 100% consistent (I am probably jinxing myself right now!)
I know others have reported having jump issues. Hopefully this helps. I'll sleep better tonight!
space bar down AND overlapping platform
This worked about 80% of the time and I have no clue why it failed the other 20%.
Here's what has been working 100% of the time so far:
1) Create a game boolean attribute (I called it jump) check that it is true
2) Create a rule that says when player collides with platform change jump attribute to true (1)
3) In your jump rule (make sure it is set to ALL):
-spacebar down (or whatever you are using for the jump key)
-game.jump = 1
-timer (longer the time higher the jump)
-accelerate (90degrees, experiment with speed to your liking)
-THIS IS KEY - change jump attribute to 0
This will make it so that when you leave the ground you cannot jump again until you collide with a platform. As soon as you leave the platform the boolean attribute is set to false (0) and you are then unable to jump again until you land (collide with ground).
So far this has been 100% consistent (I am probably jinxing myself right now!)
I know others have reported having jump issues. Hopefully this helps. I'll sleep better tonight!
Comments
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
great fix tunes. i used a similar method for allowing only one shot until it hit an enemy or reached the top. and it would not let you hold down the fire button.
good post
noodles...