Urban Wars

Help => Programming/Coding => Topic started by: Mexicouger on May 09, 2010, 07:12:16 pm



Title: player surface... AGAIN!
Post by: Mexicouger on May 09, 2010, 07:12:16 pm
I am wondering how to make a spark when shooting a wall. Well, I got all that down, but I want to make it so sparks don`t shoot off the player. So the sprite doesn`t spawn when the player is hit. I tried doing     if (trace_ent.takedamage)  and then declaring my statement, and then doing else. But it still spawns on the player. I will try a few other things, but I need extra help.


Title: Re: player surface... AGAIN!
Post by: DukeInstinct on May 11, 2010, 09:19:21 pm
I'll probably have to see the whole function. Something must be wrong in the syntax.


Title: Re: player surface... AGAIN!
Post by: Mexicouger on May 12, 2010, 07:33:59 am
I haven`t any clue what I did, but I said      if (other.classname == "player")   return;    and wheneverI shot the player, no sparks came out. I wonder why... That was supposed to mean only have sparks ON thr player. But oh well. It worked. And if you do want it to b eon the player, you use   !=  .


Title: Re: player surface... AGAIN!
Post by: DukeInstinct on May 12, 2010, 02:24:54 pm
That'll work for players and bots, however, it won't work for monsters.

I think instead of if (trace_ent.takedamage) use if (trace_ent.takedamage>0).