Skip to content

Instantly share code, notes, and snippets.

@dumptruckDS
Created July 14, 2020 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dumptruckDS/1936ba7ea4ecc0cda6d416d8c2fec7da to your computer and use it in GitHub Desktop.
Save dumptruckDS/1936ba7ea4ecc0cda6d416d8c2fec7da to your computer and use it in GitHub Desktop.
This is the code for the Spawn monsters and variants in the second mission pack "Dissolution of Eternity"
/*QUAKED monster_tarbaby (1 0 0) (-16 -16 -24) (16 16 24) Ambush Blue Green Spots
The Spawn (and hellspawn)
The spawn type is random by default.
If you want a specific type, select "Blue", "Green", or "Spots".
*/
void() monster_tarbaby =
{
local float myRand;
local float skillLevel;
if (deathmatch)
{
remove(self);
return;
}
precache_model2 ("progs/tarbaby.mdl");
precache_sound2 ("blob/death1.wav");
precache_sound2 ("blob/hit1.wav");
precache_sound2 ("blob/land1.wav");
precache_sound2 ("blob/sight1.wav");
precache_sound2 ("blob/mytosis.wav");
self.solid = SOLID_SLIDEBOX;
self.movetype = MOVETYPE_STEP;
setmodel (self, "progs/tarbaby.mdl");
setsize (self, '-16 -16 -24', '16 16 40');
self.health = 80;
self.th_stand = tbaby_stand1;
self.th_walk = tbaby_walk1;
self.th_run = tbaby_run1;
self.th_missile = tbaby_jump1;
self.th_melee = tbaby_jump1;
self.th_die = tbaby_die1;
if (self.spawnflags & 8)
{
self.th_pain = tbaby_mitosis;
self.skin = 2;
self.health = 100;
}
else if (self.spawnflags & 4)
{
self.th_pain = tbaby_mitosis;
self.skin = 1;
self.health = 60;
}
else if (self.spawnflags & 2)
{
self.skin = 0;
}
else
{
skillLevel = cvar ( "skill" );
myRand = skillLevel * 0.2;
myRand = myRand + random();
if (myRand > 0.8 && skillLevel > 1)
{
self.th_pain = tbaby_mitosis;
self.skin = 2;
self.health = 100;
}
else if (myRand > 0.5)
{
self.th_pain = tbaby_mitosis;
self.skin = 1;
self.health = 60;
}
else
{
self.skin = 0;
}
}
walkmonster_start ();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment