Urban Wars
February 08, 2025, 07:42:56 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  

Randomly spawning a different sprite

Pages: 1 [2]
  Print  
Author Topic: Randomly spawning a different sprite  (Read 1016 times)
DukeInstinct
Administrator
Lieutenant
*****
Posts: 120


The ArchDuke


View Profile WWW
« Reply #15 on: April 24, 2010, 01:56:29 am »

If you're using a traceline to detect what your weapon hit then you'd use:
Code:
if (trace_ent.takedamage)
To check whether it's a player/monster.

If you're using a entity that acts as a projectile then in that projectile's touch function you'd add:
Code:
if (other.takedamage)
Report Spam   Logged



Urban Wars Coder/3d Modeler/Animator

Pages: 1 [2]
  Print  
 
Jump to:  


Get your own Chat Box! Go Large!
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy