Y
Y
Yuri2014-03-28 14:30:03
Game development
Yuri, 2014-03-28 14:30:03

How to make a jump in Game Maker Studio if the object is constantly bouncing off the floor?

Object "a" has move_bounce_solid(true) in collision_event("b"). How can I make the jump occur between 0 and 5 pixels before the collision?
At the moment, the jump works in one or two, i.e. if it hits an event step, then the jump is made, but it often happens that this event is skipped and move_bounce_solid occurs instead of vspeed=-12.
There is an idea that these values ​​\u200b\u200bmay be in a one-dimensional array, but how to programmatically check the range of values ​​\u200b\u200bis impossible to find.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
GreatRash, 2014-03-28
@GreatRash

www.youtube.com/watch?v=qYBqGxy01dc - is it?

Y
Yuri, 2014-03-28
@Fliss

Not really, what is needed is a check for a range of collision values. Those. if there is an object in the range from 0 to 5 in y, then there should be a jump

F
fixmax1, 2014-06-11
@fixmax1

I don’t remember if there are colliders in it, but if there are, then they should be used.
We put a collider at the bottom of the player and check if he collided with the ground, if so, then we allow the jump to work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question