Health
Created By: | Marius |
eMail: | lordshoel@yahoo.com |
Difficulty Scale: | Easy |
if (self.spawnflags & H_ROTTEN) { precache_model("maps/b_bh10.bsp"); precache_sound("items/r_item1.wav"); setmodel(self, "maps/b_bh10.bsp"); self.noise = "items/r_item1.wav"; self.healamount = 15; self.healtype = 0; }Now change the value of self.healamount from 15 to 5. Leave everything else as is for now. It should now look like this:
if (self.spawnflags & H_ROTTEN) { precache_model("maps/b_bh10.bsp"); precache_sound("items/r_item1.wav"); setmodel(self, "maps/b_bh10.bsp"); self.noise = "items/r_item1.wav"; self.healamount = 5; self.healtype = 0; }When you have made that simple change go on to Step 2.
if (self.healtype == 2) // Megahealth? Ignore max_health... { if (other.health >= 250) return; if (!T_Heal(other, self.healamount, 1)) return; } else { if (!T_Heal(other, self.healamount, 0)) return; }Once you found it replace it with the following code and that should be it.
if (self.healtype == 1) // Rotten Health... { if (other.health >= 150) return; if (!T_Heal(other, self.healamount, 1)) return; } else if (self.healtype == 2) // Megahealth? Ignore max_health... { if (other.health >= 250) return; if (!T_Heal(other, self.healamount, 1)) return; } else { if (!T_Heal(other, self.healamount, 0)) return; }