C
CJ K
Guest
Good Morning, I have an alarm[0] that in 3 seconds I want the alarm to trigger and create an instance of an object after I press my action button. Any help would be appreciated.
I created a alarm[0] event with the following:
instance_create(x,y,obj_Garage_Door_Up)
In my step event of the object I have the following:
///Hero Interaction
var dist = point_distance(obj_Hero.phy_position_x, obj_Hero.phy_position_y, phy_position_x, phy_position_y);
///show_debug_message(string(dist));
if(dist < 128){
if(obj_Hero.action == true){
if(alarm[0]<0)
{
alarm[0] = room_speed *3;
}
}
}
I created a alarm[0] event with the following:
instance_create(x,y,obj_Garage_Door_Up)
In my step event of the object I have the following:
///Hero Interaction
var dist = point_distance(obj_Hero.phy_position_x, obj_Hero.phy_position_y, phy_position_x, phy_position_y);
///show_debug_message(string(dist));
if(dist < 128){
if(obj_Hero.action == true){
if(alarm[0]<0)
{
alarm[0] = room_speed *3;
}
}
}