yvodlyn
Member
Hello everyone,
I wrote this code to make spikes falling when the player goes below the spikes. However, they didn't fall when the player goes below them. Can someone help me?
Here the code:
step event:
gravity_direction = 270;
if (!collision_line(x,y,x,obj_player.y,obj_solid,false,true)) {
if (obj_player.x = self.x) {
gravity = 0.05;
}
}
if place_meeting(x,y+1,obj_solid) {
instance_destroy();
}
I wrote this code to make spikes falling when the player goes below the spikes. However, they didn't fall when the player goes below them. Can someone help me?
Here the code:
step event:
gravity_direction = 270;
if (!collision_line(x,y,x,obj_player.y,obj_solid,false,true)) {
if (obj_player.x = self.x) {
gravity = 0.05;
}
}
if place_meeting(x,y+1,obj_solid) {
instance_destroy();
}