movingPlatform
This is the jump through platform I used in my game. If I jump on it, character can’t stand on it again so the player falls off the platform.
My code:
var _movingplatform = instance_place(x, y + max(1, y_speed), oplatformmoving);
if (_movingplatform && bbox_bottom <= _movingplatform.bbox_top) {
if (y_speed > 0) {
while (!place_meeting(x, _movingplatform.bbox_top, oplatformmoving)) {
y += sign(y_speed);
}
y_speed = 0;
}
x += _movingplatform.moveX;
y += _movingplatform.moveY;
}
I want to jump on the platform again and again.
New contributor
magnetar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.