Vengeful God Jump Issue
![Captain_Average](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hey all,
Had a good search for this but to no avail (though more than happy to be corrected!).
I'm messing around with some jumping physics and have a wee character running and jumping on floors. So far, so good.
When he runs up to a wall and jumps, he pushes off. Excellent. When he pushes off, he flies to another wall and repeats. Sensational, "When can I buy it?", I hear you ask.
The issue I'm having is that it's possible to just repeatedly tap jump to fly through the wall jumping sections. When it comes to gaming, I would rather play Vengeful God and punish those with a lack of skills, and place the emphasis on timing the jump right.
So the question I pose is, how do I disable the jump temporarily when you press jump too soon, i.e., when the character is in the air? In my touch to jump rule I have the usual conditions, and also specify that attribute "Jump Disable" must be false for jump to be valid. "Jump Disable" attribute is constrained to true (for 0.5s, run to completion) when touch is pressed, and attributes touching floor, wall are false. Otherwise, Disable is false.
I have a display in the top corner showing the state of Jump Disable, which is constantly false, even when I click repeatedly in the air. Why?
Any ideas or suggestions would be greatly appreciated!
Had a good search for this but to no avail (though more than happy to be corrected!).
I'm messing around with some jumping physics and have a wee character running and jumping on floors. So far, so good.
When he runs up to a wall and jumps, he pushes off. Excellent. When he pushes off, he flies to another wall and repeats. Sensational, "When can I buy it?", I hear you ask.
The issue I'm having is that it's possible to just repeatedly tap jump to fly through the wall jumping sections. When it comes to gaming, I would rather play Vengeful God and punish those with a lack of skills, and place the emphasis on timing the jump right.
So the question I pose is, how do I disable the jump temporarily when you press jump too soon, i.e., when the character is in the air? In my touch to jump rule I have the usual conditions, and also specify that attribute "Jump Disable" must be false for jump to be valid. "Jump Disable" attribute is constrained to true (for 0.5s, run to completion) when touch is pressed, and attributes touching floor, wall are false. Otherwise, Disable is false.
I have a display in the top corner showing the state of Jump Disable, which is constantly false, even when I click repeatedly in the air. Why?
Any ideas or suggestions would be greatly appreciated!
Comments
On your actor, put when actor overlaps or collides with actor with tag (create a tag with all the things you want him to be able to jump off) then change game.In Air to false.
On your jump rules, make it so that In Air needs to be false to jump and then turn In Air to true when you jump.
Ace
That's great, but I've not got any problems with the actor jumping in mid-air, as it is he's constrained to jumping off of "things" already. I probably didn't explain it well enough in the first post -
Say you have two walls...
|x------>y|
When player presses jump at position x, he gets a good jump and flies towards position y, where the process can be repeated.
|a->b--> c|
Now let's say player presses jump at position a, heading for c. If he waits til c and presses jump then boom, off you go. But if player anticipates jump too soon and presses at point b, I'd like to make it that jump is disabled, so that when he reaches point c he cannot jump.
Does this seem like a stupid game mechanic!? It maybe is getting a little convoluted.
Just out of interest, I'll post my slightly more detailed rules:
In Actor...
Actor has when Jump is true and touching wall is true, then for 0.3s constrain attributes self motion y and x to 100 or whatever (jump!). Touching wall is true when actor overlaps or collides with wall.
In my jump button (large invisible touch screen)...
Jump is true for 0.1s when actor is pressed and Jump Disable is false. Jump DIsable is true for 0.5s, run to completion, when touch is pressed and touching floor and wall rules are false, or character is NOT touching anything.
Argh!