Monster Health
Author: Lord AsakiSource: https://www.insideqc.com/qctut/qctut-53.shtml
Ok, here's a quick little tutorial I wrote to let you specify the health
of monsters in the map. I've used this in both Renaissance and Ax Attack.
This only works if you change the flags of the monsters in the maps, so it's
useless if you don't have/change any maps. I'm assuming you know how to do
this kind of stuff.
First is the QC part of the tut, we'll start with soldier.qc for this
example. Scroll down under 'void() monster_army =' to where it says
'self.health = 30;' Change it so it says...
if (!self.health) // if you didn't change the health,
self.health = 30; // keep it at default
...Now, you can do this with skins too. Below 'self.health = 30;', add a new
line of code that says...
if (!self.skin) // if you didn't change the skin,
self.skin = 0; // just use the default one
There, easy enough? If you want to, you can do this to all the rest of
the monsters too, but I wouldn't recommend doing the health thing to the
Zombies, if you know what I mean ;)
Now that we've done the QC part of it and compiled the code, we go on to
the mapping part. This is easy. I use QuArK for my maps, so this part may
vary. Right click on the monster you want to change and select
"Specifics...". Now add a new flag to the monster's properties labeled
"health" and set it to whatever number you want their health to be at. If you
did the skin part too, just add a new flag called "skin" and set it to the
skin you want. Now compile the map and see if you like it. If not, just
change their health to something different.
Tags: tutorial, quakec, qc, insideqc, monster, ai