Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.event_damage and .touch in projectile code

#1
Question 
Hi all,

I was looking through the code for the different weapons and got confused by some of the properties of the projectiles. When either weapon spawns a projectile, it sets the following properties:

Code:
missile.takedamage = DAMAGE_YES;
missile.damageforcescale = WEP_CVAR(devastator, damageforcescale);
missile.health = WEP_CVAR(devastator, health);
missile.event_damage = W_Devastator_Damage;
missile.damagedbycontents = true;
...
missile.touch = W_Devastator_Touch;

What is the purpose for making projectiles take damage? Don't they only need a touch method? What is one method doing (W_Devastator_Damage) that the other isn't (W_Devastator_Touch)?
Reply

#2
Projectiles can take damage for the purpose of being able to shot down on mid air
[Image: 0_e8735_c58a251e_orig]
Reply

#3
(07-20-2016, 10:58 PM)aa Wrote: Projectiles can take damage for the purpose of being able to shot down on mid air

Oh, ok. That makes sense. thanks for the help Smile
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  q3shader syntax VS Code extension LegendGuard 0 673 10-28-2022, 12:30 PM
Last Post: LegendGuard

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-