change killer in trigger_multiple + func_mortar_field chain
I have a map that has a trigger_multiple that gets touched by Allied (Day of Defeat) and that trigger_multiple's target is a func_mortar_field. However, the mortar field is in the Allied area so when an Allied soldier is killed by this mortar field the killer is another Allied which causes a team kill.
I need to prevent DOD TK Revenge from thinking it is a TK. I still want it to ultimately be triggered by Allied soldiers but I need the killer to be anyone but an Allied soldier (to prevent a team kill). I'm currently working with register_message() and DeathMsg and am able to change the killer. I think this may work to prevent DOD TK Revenge from seeing a TK, however, I still need to filter out the mortar as the weapon used to kill the player. So, I was hoping that I would be able to somehow intervene with this chain of events much much sooner. I was thinking maybe I could hook the player/trigger_multiple touch, supercede it and then manually do it with another entity as the "killer" (so to speak). Or, maybe between the trigger_multiple and then func_mortar_field. I'm not entirely sure which if either of these is possible. Let me know if you have any ideas. And example of the entities involved: Code:
{ |
Re: change killer in trigger_multiple + func_mortar_field chain
You may have to do something like set pev_inflictor to 0 or to entity index when player takes the damage.
|
Re: change killer in trigger_multiple + func_mortar_field chain
I will try something like that if I can't get this to work out:
Ok, so I finally figured out how the DeathMsg args work (in Day of Defeat). However, I was under the impression that if I register the message and change the arguments then the arguments when I register the same as an event will also be changed. However, it does not seem to work correctly. PHP Code:
|
Re: change killer in trigger_multiple + func_mortar_field chain
I was thinking that the TK plugin was working as ATAC does, by inflictor, but you seems to say it works with event DeathMsg, and yes, register a message doesn't affect arguments passed in registered event, you have to come earlier, maybe in TraceAttack or TakeDamage, supercede and send your own should do the job.
OR you can edit the TK plugin for your needs, could be better. |
Re: change killer in trigger_multiple + func_mortar_field chain
Quote:
Quote:
|
Re: change killer in trigger_multiple + func_mortar_field chain
Ok, so I think I've got the best thing yet for this (and it has been working throughout my testing):
PHP Code:
I would really like to keep the mortar as the weapon image which seems to mean I need to find an Axis player every time to put in the place of the cvar. I would like to keep this plugin as computationally small as possible so I would like to avoid this. I would gratefully accept a solution that would mean there would be NO killer (blank) but still killed with the mortar. Anyways . . ., I can't think of any pitfalls of this method yet but if you guys think of something let me know. |
Re: change killer in trigger_multiple + func_mortar_field chain
How does it work by default ?
What is caller, activator, why does it detect Team Attack, etc... What is mortar ??? xD |
Re: change killer in trigger_multiple + func_mortar_field chain
Quote:
Quote:
Player touches trigger_multiple > trigger_multiple uses func_mortar_field > func_motar_field does it's work and sends out a motar bomb (in the area of the brush that defines the entity's physical space) > Bomb kills players near explosion :) The caller is the player that originally started the sequence (the one that touched the trigger_multiple). The activator seems to be the actual trigger_multiple that used the func_mortar_field. I will just use what I have and consider just replacing my cvar with a random enemy team member. |
Re: change killer in trigger_multiple + func_mortar_field chain
Have you tried to replace activator with caller ?
|
Re: change killer in trigger_multiple + func_mortar_field chain
Quote:
If you meant replace caller with activator (SetHamParamEntity(2, idactivator))then it works the same as using worldspawn (0). I think I will either leave it as caller is worldspawn or get a random axis player to put as the caller. |
All times are GMT -4. The time now is 07:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.