parShooterBoss
A simple parent that can be assigned to an object to give it the attributes of a generic shooter boss.
Create
/// Define HP and immune frames.
maxhp = 100;
hp = maxhp;
immune = 0
MAXIMMUNE = 15;
Destory
/// The boss is dead, give the player an item.
instance_create(x,y,objBossItem)
Begin Step
/// Immune Frames decrement and Boss Dead Check
if immune > 0 { immune -= 1; }
if hp <= 0 { instance_destroy(); }
Collision bullet
/// Reduce HP by 1 and Play sndBossHit
if immune <= 0 {
audio_play_sound(sndBossHit,0,0);
immune = MAXIMMUNE
hp -= 1
}
with(other) { instance_destroy() } // destroy the bullet when it touches the boss