Created By: [SL1CK]-=MERL1N=-
eMail: phillm@netlink.com.au
Difficulty Scale: Easy/Medium


Step 1
Does that first (shareware) boss annoy you ? Do you wish you could just blow the absolute crud through him ? Well now you can...

Step 2
All of this is done in boss.qc so open that up. We will be adding some pain frames in so he can be in pain, so if you have a model of him with pain frames (other than the existing ones) you can use them. (and if you do, please tell me where to get it :])

Now find void() boss_awake =

Step 3

Now we dont want him dying from one shotgun blast so change the

If (skill == 0)

self.health = 1;

else

self.health = 3;

To something like 1000 and 3000;

And where it says

Self.takedamage = DAMAGE_NO;

Change the NO to YES.

Step 4

Now that he can take damage in and has 1000(on easy) or 3000 health we need to put in some pain frames, they are basically just the pain of the electricity but if you have your own frames change the $shock frames to your ones, dont forget to add em up the top too :)

You can just cut and paste this if you want...

Put them just above the death frames (deatha etc)

 

void() boss_pain1 =[ $shocka1, boss_pain2 ] {};

void() boss_pain2 =[ $shocka2, boss_pain3 ] {};

void() boss_pain3 =[ $shocka3, boss_pain4 ] {};

void() boss_pain4 =[ $shocka4, boss_pain5 ] {

sound (self, CHAN_VOICE, "boss1/pain.wav", 1, ATTN_NORM);}; // pain noise

void() boss_pain5 =[ $shocka5, boss_pain6 ] {};

void() boss_pain6 =[ $shocka6, boss_pain7 ] {};

void() boss_pain7 =[ $shocka7, boss_pain8 ] {};

void() boss_pain8 =[ $shocka8, boss_pain9 ] {};

void() boss_pain9 =[ $shocka9, boss_missile1 ] {}; // auto shoot a lavaball

 Step 5

Now that he can be in pain and go ouch (or whatever .wav U put there) lets get him to die, and possibly gib :)

Add this in under the death frames, I copied it from somewhere else and there is prob an easier way but im still kind of a newbie at this :)

Void() GibBoss =

{

sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NORM);

// throw tons of meat chunks

local vector boss;

local float x, y, z;

local float r;

local entity n;

 

boss = self.origin;

 

z = 16;

while (z <= 144)

{

x = -64;

while (x <= 64)

{

y = -64;

while (y <= 64)

{

self.origin_x = boss_x + x;

self.origin_y = boss_y + y;

self.origin_z = boss_z + z;

 

r = random();

if (r < 0.3)

ThrowGib ("progs/gib1.mdl", -999);

else if (r < 0.6)

ThrowGib ("progs/gib2.mdl", -999);

else

ThrowGib ("progs/gib3.mdl", -999);

y = y + 32;

}

x = x + 32;

}

z = z + 96;

}

killed_monsters = killed_monsters + 1;

WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);

WriteByte (MSG_BROADCAST, TE_LAVASPLASH);

WriteByte (MSG_ALL, SVC_KILLEDMONSTER);

WriteCoord (MSG_BROADCAST, self.origin_x);

WriteCoord (MSG_BROADCAST, self.origin_y);

WriteCoord (MSG_BROADCAST, self.origin_z);

SUB_UseTargets ();

remove (self);

};

Step 5 

Now that will gib him but we have to put in how to tell if he is blow away enough to be gibbed. This will go under a new function called boss_die put it under the last bit of code we added...

void() boss_die =

{

if (self.health < -15) // if health under 15

{

GibBoss (); // call the function in step 4

return;

}

else // otherwise

{

boss_death1 (); // normal death

}

};

If you want a better chance of dieing change the 15 to like 2 or sumthin, and less chance, higher than 15 :)

 

Step 6

Now, we are nearly there we just need to tell everything of the new code bits in the boss_awake function, so put this is in just under the health we changed earlier...

self.th_pain = boss_pain1;

self.th_die = boss_die;

this just says when the boss dies call boss_die and when he gets hurt, play the pain frames. If you still want to be able to hit the lightning and kill him go on to the next, simple step, otherwise your done :)

Step 7

Go down to the function named lightning_use, and right at the end of the function you should see

self.health = self.health - 1;

this says do 1 damage to whatever it hits, that is lame when the boss has (in this tut anyway) 1000 or 3000 health, so change the 1 to 1000. Thats it! If your monsters health is some other number work it out so that the lightning damage will kill him in 1 hit (easy) or 3 (med, hard, nm).

Have fun gibbin !

Tutorial html coding by Achilles.