Forum

a poison zombie gib gun

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

a poison zombie gib gun

Postby MeTcHsteekle » Fri Aug 15, 2008 12:49 am

hellos agin

i wanna make a well ya and i dont know wut ima supposed to copy and modifi

its palnning to be like the nailgun, like a seconday weapon so...

i need to know which w_fire is for the nailgun..

and also how to make the zombie gibs it fires poisonus

any help is apprecated :D

ooh i forgot...please/?/
bah
MeTcHsteekle
 
Posts: 399
Joined: Thu May 15, 2008 10:46 pm
Location: its a secret

Postby Orion » Fri Aug 15, 2008 4:15 am

Well, the firing function for the nailgun is W_FireSpikes() in weapons.qc.

Also, to make the zombies poison the enemies, try this:

Add this before ZombieGrenadeTouch() in zombie.qc:
Code: Select all
void() ZombiePoison =
{
  self.nextthink = time;

  if (self.enemy.health <= 0 || self.enemy.waterlevel > 1) // if the enemy is dead or in water...
  {
    remove(self); // then heal the poison effect
    return;
  }

  if (self.t_width < time)
  {
    T_Damage (self.enemy, self, self.owner, 5); // do 5 damage (changeable)
    self.t_width = time + 2; (damage enemy every 2 seconds (changeable)
  }
};

void(enetity e) GetPoisoned =
{
  local entity poison;

  poison = spawn ();
  poison.owner = self.owner;
  poison.enemy = e;
  poison.nextthink = time;
  poison.think = ZombiePoison;
};



And in ZombieGrenadeTouch() you'll see a line like this:
Code: Select all
T_Damage (other, self, self.owner, 10 );


After that line, add this:
Code: Select all
GetPoisoned (other);



If a zombie hit you 2 or more times the poison will do damage twice or more as fast.
Hope this helps. :wink:
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest