A
// Create
reloadTime = 1 * room_speed; // = 1 second
reloading = 0;
// Step event
// Make the reload timer count down
if (reloading > 0) {
reloading -= 1;
}
if (/*whatever condition that makes the AI want to shoot*/) {
if (reloading <= 0) {
// Set the reload timer
reloading = reloadTime;
// Create the bullet
instance_create(x, y, enemyshoot3);
instance_create(x, y, enmyshoot2);
instance_create(x, y, enemyshoot3);
}
}
var inst_1 = instance_create(x, y, enemyshoot3);
inst_1.alarm[0] = your_cooldown*room_speed;