poison
Moderator: InsideQC Admins
6 posts
• Page 1 of 1
poison
Ok, I'm trying to implement an enemy that poisons the player using the tutorial:
http://www.inside3d.com/showtutorial.php?id=65
Which is for a player's poison axe. I copied it into the enemy's attack in question and nothing happens. It looks like there's something missing somewhere - do I need to put reference the poison_think somehwhere else or something?
Thanks for your time.
http://www.inside3d.com/showtutorial.php?id=65
Which is for a player's poison axe. I copied it into the enemy's attack in question and nothing happens. It looks like there's something missing somewhere - do I need to put reference the poison_think somehwhere else or something?
Thanks for your time.
- ijed
- Posts: 64
- Joined: Sat Jul 26, 2008 4:26 am
- Location: Chile, SA
GetPoisoned is what makes the magic happen, but unless your monster is doing a traceline, it won't work as is.
Try changing GetPoisoned(trace_ent); to GetPoisoned(self.enemy);
Try changing GetPoisoned(trace_ent); to GetPoisoned(self.enemy);
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
Like a charm. But.
How do I stop it with a health pack?
I'm almost completely new to qc.
AFAIK I can't check if the player is healed within OnPoisonThink, so I have to make a variable? eg. Poisoned - but then I write an if poisoned statement and how will it remove the poison from the player?
I know there's a simple way of doing this.
How do I stop it with a health pack?
I'm almost completely new to qc.
AFAIK I can't check if the player is healed within OnPoisonThink, so I have to make a variable? eg. Poisoned - but then I write an if poisoned statement and how will it remove the poison from the player?
I know there's a simple way of doing this.
- ijed
- Posts: 64
- Joined: Sat Jul 26, 2008 4:26 am
- Location: Chile, SA
It is now that I notice that this tutorial has a small bug in that it may not quit doing damage to the player when he hits water.
(Should be self.owner.waterlevel)
Anyway in response to your question, just create a .poisoned variable, then in GetPoisoned() add a ent.poisoned = TRUE; and somewhere in health_touch, add a other / self.poisoned = FALSE;. (whatever the context is that points to the player)
Anyway in response to your question, just create a .poisoned variable, then in GetPoisoned() add a ent.poisoned = TRUE; and somewhere in health_touch, add a other / self.poisoned = FALSE;. (whatever the context is that points to the player)
Last edited by Dr. Shadowborg on Tue Aug 26, 2008 3:30 pm, edited 1 time in total.
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest