pixeltroid
Member
1. If I am NOT standing on the platform, the platform changes direction when it touches the ground normally.
2. But if I am standing on it when it touches the ground, it stops moving. Its only when I jump up does the platform starts moving.
Here's a visual of the same thing happening:
Here are the codes for the vertical moving platform "obj_movingplatform_vnew":
CREATE
STEP
Collision with obj_solid
Collision with obj_blocker*
(*basically obj_blocker is an invisible object that I place in the room editor that causes the platform to stop and change direction. This is useful because it helps me control the distance the platform moves in the room editor itself).
In the player object's step event I have this:
STEP
I have the exact same code for the horizontal moving platform (except it's "x" instead of "y") but that works fine without any issue.
Does any one know whats causing the issue? How do I fix it?
Any help would be greatly appreciated!
2. But if I am standing on it when it touches the ground, it stops moving. Its only when I jump up does the platform starts moving.
Here's a visual of the same thing happening:
Here are the codes for the vertical moving platform "obj_movingplatform_vnew":
CREATE
Code:
dir = choose(-1, 1);
Code:
if dir = 1 {
y+=1}
else
{y-=1}
Code:
dir *= -1
Code:
dir *= -1
In the player object's step event I have this:
STEP
Code:
if place_meeting (obj_player.x, obj_player.y+1 , obj_movingplatform_vnew)
{
y += 1 * obj_movingplatform_vnew.dir
}
I have the exact same code for the horizontal moving platform (except it's "x" instead of "y") but that works fine without any issue.
Does any one know whats causing the issue? How do I fix it?
Any help would be greatly appreciated!
Last edited: