Raised This Month: $32 Target: $400
 8% 

Solved TraceAttack not firing on suicide? (falls/triggers)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jlp1528
Junior Member
Join Date: Oct 2017
Old 10-15-2017 , 16:32   TraceAttack not firing on suicide? (falls/triggers)
Reply With Quote #1

Previous question solved, need to figure out how to mark my threads "solved" when they are. But now it seems I have a new problem - does TraceAttack not fire when players (specifically Insurgency bots in this case) take damage from falling and triggers? I have the variable set so the bombers are supposed to explode when they die, but they are not exploding when they die from falling or trigger damage.

I know I could use event player_death, but I'm already detecting death by using the TraceAttack function to compare damage dealt to the player vs their health before the hit (pulled with GetClientHealth). I also cannot use OnTakeDamage because it does not get hitgroup like TraceAttack.

Any suggestions?

Last edited by jlp1528; 10-18-2017 at 18:47.
jlp1528 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 10-16-2017 , 01:35   Re: TraceAttack not firing on suicide? (falls/triggers)
Reply With Quote #2

I wouldn't expect the game to perform a trace for those situations. A trace would be done to see if someone is in the path of a bullet, not if someone touches a trigger.

To mark as solved, edit the first post of the thread and pick "solved" from the title prefix dropdown.
Fyren is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-16-2017 , 16:15   Re: TraceAttack not firing on suicide? (falls/triggers)
Reply With Quote #3

Any particular reason you need to know the hitgroup?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
jlp1528
Junior Member
Join Date: Oct 2017
Old 10-18-2017 , 18:47   Re: TraceAttack not firing on suicide? (falls/triggers)
Reply With Quote #4

Somehow I forgot to subscribe to the thread, oops.

Thx for the tip @Fyren, fixed first thread.

@Powerlord, I need to know the hitgroup because I want the bomber to have a chance of exploding on chest/stomach hits and limb hits like the original plugin did. Said plugin and many other can be found here: https://github.com/Daimyo21/Insurgency-dy-sourcemod

In any event, the answer to the question is yes; TraceAttack does not fire on these sort of deaths. However, the fix in this case is actually easy - just hook player_death and look for attacker 0, and trigger the explode on death chance function from there.

Now to figure out why TraceAttack isn't giving me correct damage values... But I'll make another thread for that. That is, if I can't figure it out on my own.
jlp1528 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 10-19-2017 , 00:31   Re: TraceAttack not firing on suicide? (falls/triggers)
Reply With Quote #5

Damage reported in TraceAttack is likely to be the damage before any modifiers. I don't know anything about Insurgency, but things like location hit, armor, or criticals wouldn't have yet been taken into account.
Fyren is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode