Created By: Pob the Impaler
eMail: A.W.Johnstone@btinternet.com
Difficulty Scale: Easy


Please download this file, without it this tutorial will not work, do not mail the autor regarding problems if you dont have this file!!



I intended for this tutorial to be part of the RIPs but it wasn't really relevant
so this'll be my first non-reaper tutorial! Anyway, if Legion can do them, so can I :)

This is dead easy, and will allow you to have multiskin monsters with different
abilities depending on the skin. I used this procedure to great effect in my
RealQuake and ReaperFX patches (even if I do say so myself).

You will need the model supplied to get this to work.
The model has the standard zombie skin, plus an extra one. The extra skin was
inserted with Adquedit.




Step 1

In the directory where you intend to put this patch, make a directory called progs. So you will have something like... c:\quake\zombie\progs into this progs dir put the zombie.mdl
Step 2

Open up zombie.qc Find the function monster_zombie void() monster_zombie = Now find the line: setmodel (self, "progs/zombie.mdl"); after this line add:

//===Begin multiskin code===//
local float skinchance; // this is the chance that a zombie will have the plague  :)
skinchance = random();
if (skinchance >= 0.75)
{
self.skin = 1; // remember the default skin is 0
}
//===End multiskin code===//



Step 3

Find the function ZombieGrenadeTouch void() ZombieGrenadeTouch = Find the line: sound (self, CHAN_WEAPON, "zombie/z_hit.wav", 1, ATTN_NORM); Now delete all the lines ABOVE this line. Now at the top of the function add:

//===Begin multiskin code===//
local float puke;  // amount of damage for Plague Zombie.
if (other == self.owner)		
return;		// don't explode on owner	
if (other.takedamage)
	{
if (self.owner.skin == 1)
{
puke = ((random() * 100) * 0.5);
T_Damage (other, self, self.owner, puke );
}
else
{
		T_Damage (other, self, self.owner, 10 );
}
//===End multiskin code===//


Now there will be a 25% chance that a zombie will have the plague.
This zombie can do either next to no damage, or gib a player in one hit.

This method can be used to alter any ability a monster has depending on it's skin.
Like health or even what weapon it fires.
just use a:


if(self.skin == 1)
{
Dothis....;
}


Have fun kids!

HTMLized by: Adrian "Mr. Pink" Finol