raze/wadsrc/static/zscript/games/duke/actors/rabbitspawner.zs
Christoph Oelckers 9fa2fb75cf - scriptified the respawn controller.
This also handles one special RRRA controller which was just easier to scriptify right away than temporarily work around it.
2022-11-20 11:58:19 +01:00

43 lines
557 B
Text

class RedneckRabbitSpawner : DukeActor
{
default
{
statnum STAT_FX;
extra 0;
}
override void Initialize()
{
self.cstat = CSTAT_SPRITE_INVISIBLE;
}
override void Tick()
{
if (self.statnum == STAT_RABBITSPAWN)
{
if (self.hitag > 0)
{
if (self.extra == 0)
{
self.hitag--;
self.extra = 150;
self.spawn("RedneckRabbit");
}
else
self.extra--;
}
}
}
override void onRespawn(int low)
{
if (self.lotag == low)
{
if (!ud.monsters_off)
self.ChangeStat(STAT_RABBITSPAWN);
}
}
}