Does anyone have an example of a user defined jump power.
Example, jump assigned to space bar
single press is X power
slightly longer press is Y power
Trying to let the player determine jump power accordingly. Ideas?
What you ask is not crystal clear but I think it's something like that:
I am doing something like that in the game I am making now, and I found this to feel the best to me.
And a third implementation, 'cause we can.
here is mine, thanks to the other submitters I've managed to do it:
the longer you press on Up arrow, the higher the player jumps
This really fine tunes character control, something that really feels rigid in most platformers that lack such a thing. The player can't relate to the character in game, if he isn't in much control of him.
How would you be able to do this for touch devices such as mobile?
just have touch simulate jumping
so something like:
Touch| On Touch Any Start: player| Simulate Platform pressing Jump
Ya thats how i have it set up but the jumping power is not varied but fixed.
You need to set it so that the touch triggers your event for the variable jump the way you did with the up arrow. The problem with doing Simulate Platform Pressing Jump is it basically just triggers a set vectorY at whatever strength your jump power is. Instead on touch do the same thing you are doing for your variable power. Or maybe with is touching instead of on touch.
I think I see where I went wrong now. "touching instead of on touch."
I will have to try it ounce i figured out the new found bugs on my game i created.
Develop games in your browser. Powerful, performant & highly capable.
Platformer is jumping
[Jump Key] is not being pressed
Set Y Vector to 0
I have problem like this.
I wanna my character jump on Trampolin, as we know when we jump using trampolin we can jump higher and higher.
Can anybody help me to solve this?
you need to set an instance variable and every time it touches the trampoline add one to it.
on colision with trampoline and
platform is falling and ----- >
instance variable is 0 set vector y to -500
add 1 to instance variable
instance variable is 1 set vector y to -700
instance variable is 2 set vector y to -1000
and so on.
then to stop this
player is on floor ---> set instance variable to 0
hope i helped!