Urban Wars
August 16, 2017, 08:44:46 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome, here you will find all the information on Urban Wars
 
  Home Help Search Staff List Login Register  

player surface... AGAIN!

Pages: [1]
  Print  
Author Topic: player surface... AGAIN!  (Read 125 times)
Mexicouger
Lieutenant
*
Posts: 111


View Profile
« 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.
Report Spam   Logged

Social Buttons

DukeInstinct
Administrator
Lieutenant
*****
Posts: 120


The ArchDuke


View Profile WWW
« Reply #1 on: May 11, 2010, 09:19:21 pm »

I'll probably have to see the whole function. Something must be wrong in the syntax.
Report Spam   Logged



Urban Wars Coder/3d Modeler/Animator

Mexicouger
Lieutenant
*
Posts: 111


View Profile
« Reply #2 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   !=  .
Report Spam   Logged
DukeInstinct
Administrator
Lieutenant
*****
Posts: 120


The ArchDuke


View Profile WWW
« Reply #3 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).
Report Spam   Logged



Urban Wars Coder/3d Modeler/Animator

Pages: [1]
  Print  
 
Jump to:  


Get your own Chat Box! Go Large!
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum | Buy traffic for your forum/website

Powered by SMF | SMF © 2016, Simple Machines