UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Trigger_damage activated by grenades only?

broken avatar :(
Created 7 years ago
by AlecKeaneDUB
0 Members and 1 Guest are viewing this topic.
1,592 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 September 2014
Last active: 2 months ago
Posts
191
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Let's all just light up a blunt, and make stuff.
×
AlecKeaneDUB's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
AlecKeaneDUB's Contact & Social LinksaleckeanedubAlecKeaneDUBAlecKeaneDUB
How can I make a trigger_damage sensitive to grenades only? They already work but I need it to be triggered ONLY by grenades and no other weapon. Any help? Thanks
Marked as best answer by AlecKeaneDUB 7 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 3 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
there is a couple of ways of doing this you can do it in code and when the trigger takes damage check that the "type" received is of type,
Code Snippet
Plaintext
"MOD_GRENADE_SPLASH" || type == "MOD_GRENADE" || type == "MOD_EXPLOSIVE"
.
you can get this data by doing
Code Snippet
Plaintext
damageTrig waittill( "damage", amount, attacker, direction_vec, point, type ); 

the other option is in radiant under the entity window to check the box for no on all types of damage except for explosion and projectile.

 
Loading ...