G
Grillied
Guest
Title isn't worded greatly, but basically I have objects that are deleted upon collision with the player. I need the objects to respawn after a set amount of time, so I'm using an alarm to do that. The problem is if I collide with multiple objects, only the last one I collided with respawns. I know this is because the alarm resets on every collision, but I can't think or find any way around that. I think it would work fine if I could have the alarm triggered on the object being deleted, so it is separate, but I don't think I can since it is deleted immediately. Sorry if this is unclear.
Player Collision Code:
xpos = other.x;
ypos = other.y;
if (alarm[0] == -1) {
alarm[0] = 3*room_speed;
}
Alarm Code:
instance_create_layer(xpos, ypos, "Instances", oWall);
Player Collision Code:
xpos = other.x;
ypos = other.y;
if (alarm[0] == -1) {
alarm[0] = 3*room_speed;
}
Alarm Code:
instance_create_layer(xpos, ypos, "Instances", oWall);