C
Costco2
Guest
Hello, totally amateur here, so I'm working on a code that makes one object disappear (or instance destroy), then calls another object briefly to appear (for say 10 seconds). then stop and recreate the original instance and then loop.
I so far have this:
Create:
alarm[0] = 120;
Alarm[0]
instance_destroy(oBoss);
timer = 15;
timer -= 1;
if (timer > 0)
{
var location_x = random_range(0,2056);
var location_y = -2;
instance = instance_create_layer(location_x,location_y, "Rocks", oRocks)
instance.speed = 8;
instance.direction=270;
}
else
{
instance_create_layer(998,168, "Enemy", oBoss)
alarm_set(0,900)
}
}
I think I may have this wrong, I can't seem to get the instance to destroy itself nor call the other objects, any help would be great!
I so far have this:
Create:
alarm[0] = 120;
Alarm[0]
instance_destroy(oBoss);
timer = 15;
timer -= 1;
if (timer > 0)
{
var location_x = random_range(0,2056);
var location_y = -2;
instance = instance_create_layer(location_x,location_y, "Rocks", oRocks)
instance.speed = 8;
instance.direction=270;
}
else
{
instance_create_layer(998,168, "Enemy", oBoss)
alarm_set(0,900)
}
}
I think I may have this wrong, I can't seem to get the instance to destroy itself nor call the other objects, any help would be great!