Step 2
Items.qc
2a.
Ok, now find the 'BackPackTouch' function, it should be near the end.
Now, find this code:
if (other.weapon == best)
{
stemp = self;
self = other;
self.weapon = W_BestWeapon ();
self = stemp;
}
if (deathmatch == 4)
{
other.health = other.health + self.health; //Give them the extra Health
sprint(other, "You get 10 health\n");
if (other.health > 299) //If they got over 300 health, Power them Up!
{
other.ammo_cells = 0; //Set cells to 0 so they don't go 8xDamage Discharging and stuff
sound (self,CHAN_VOICE,"player/land2.wav",TRUE,ATTN_NORM); //Play a sound so they know
sprint(other, "Octa-Damage!! Bonus Pentagram!! Bonus Ring!!\n"); //Tell them what they get
//This stuff gives them the items and sets the Time limits
other.invincible_time = TRUE;
other.invincible_finished = (time + 30);
other.invisible_time = TRUE;
other.invisible_finished = (time + 30);
other.super_time = TRUE;
other.super_damage_finished = (time + 30);
other.items = (other.items | IT_INVULNERABILITY | IT_QUAD | IT_INVISIBILITY);
other.health = 250; //set their Health back to 250
other.aflag = 3;//Set the flag so that the Lightning doesn't recharge
//and so T_Damage does 8x damage
}
}
2b.
Find the 'DropBackpack' Function, It should be right below the last one
Put this code at the end of it:
if (deathmatch == 4)
item.health = 10;
Wow! We're done with items.qc now. The rest is pretty simple.
|