Null-Z
Member
I want to have falling platforms in my game and tried this chunk of code.
I have the parent set as the ground object.
Under the Step Event
-
triggered=false;
timer=10;
if triggered
{
if timer == 0 grav = 6;
else timer -= 1;
}
else
{
if collision_rectangle(x-10, y-50, x+10, y+50, Player, true, false) triggered = true;
}
-
But the platform refuses to fall when the player stands on it.
what am I doing wrong?
I have the parent set as the ground object.
Under the Step Event
-
triggered=false;
timer=10;
if triggered
{
if timer == 0 grav = 6;
else timer -= 1;
}
else
{
if collision_rectangle(x-10, y-50, x+10, y+50, Player, true, false) triggered = true;
}
-
But the platform refuses to fall when the player stands on it.
what am I doing wrong?