How can i setup a hurt trigger which only damage zombies?
Use a trigger_muliple in radiant, get the ent in script and just waittill it is triggered, and then check if the ent that triggered it is not a player.
Code Snippet
Plaintext
ent waittill( "trigger", who ); if(!IsPlayer( who )){ //do this to ai who DoDamage( 50, ent.origin ); }
Depending on what you do, additional dog checks would be necessary. You could additionally check all ai if touching trigger when it is triggered and dodamage to each one instead of just the one that triggered.
Code Snippet
Plaintext
while(1){ ent waittill( "trigger", who ); ai = GetAiArray( "axis" ); for( i = 0; i < ai.size; i++ ){ if(ai[i] IsTouching( ent )) ai[i] DoDamage( 50, ent.origin ); } wait(.5); }
Last Edit: June 21, 2016, 03:31:28 pm by MakeCents
Use a trigger_muliple in radiant, get the ent in script and just waittill it is triggered, and then check if the ent that triggered it is not a player.
Code Snippet
Plaintext
ent waittill( "trigger", who ); if(!IsPlayer( who )){ //do this to ai }
Depending on what you do, additional dog checks would be necessary
I would like to make a trap which kills zombies and dogs in higher rounds, but can't kill the player that fast.
Example: A trigger hurt with dmg and damage 10000. --> Can kill zombies in higher rounds, but also kill the player instantly.
So i need to reduce the player damage to example 25.
The difference would be in the last one, you will hurt everyone, but in the first one you may not hurt the player or may not hurt the ai, depending on which returns the trigger...
Last Edit: June 21, 2016, 03:44:25 pm by MakeCents