Cause i was having the idea of having class specific voicelines when a character kills a specific monster or player class, but im not exactly sure if, in ACS or Decorate, there is a way to get someone's killer.
Usually zdoom's forums just go "Meh, just get the monster's target and give it an inventory" but the problem with this logic is that in zdoom, there is only one player to care about. In zandronum, the player that the monster will be engaging is not necessarily the one that will be killing it. And it does not exactly solve the problem on a PVP situation.
So basically i am wondering if there is a way to give a character's killer a certain inventory, including in pvp, that could make a certain character trigger a sound or something.
Is there a way to get someone's killer and assign it an inventory?
- FranckyFox2468
- Forum Regular
- Posts: 180
- Joined: Sat May 07, 2016 8:30 pm
Re: Is there a way to get someone's killer and assign it an inventory?
There are DEATH scripts for players. There are also KILL scripts for monsters. Monsters have to have "USEKILLSCRIPTS" flag on them for the script to run for them. You can do any kind of inventory check there.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
- FranckyFox2468
- Forum Regular
- Posts: 180
- Joined: Sat May 07, 2016 8:30 pm
Re: Is there a way to get someone's killer and assign it an inventory?
Okay but how to you get who's the killer? Cause said script still appears to take in account their last target and not the killer, and thus does not solve the problem i have mentionned above.
Last edited by FranckyFox2468 on Fri Dec 01, 2017 8:38 pm, edited 1 time in total.
Re: Is there a way to get someone's killer and assign it an inventory?
Uh, the target is the killer in both cases.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
- FranckyFox2468
- Forum Regular
- Posts: 180
- Joined: Sat May 07, 2016 8:30 pm
Re: Is there a way to get someone's killer and assign it an inventory?
Wait really? Cause i did some testing involving target-based trigger on death at somepoint and the item was given to the player it was last attacking/facing rather than the killer.
Are you sure there isn't something more to it?
EDIT:
Oh wait... SetActivatorToTarget... nevermind. Thanks for the help.
Re: Is there a way to get someone's killer and assign it an inventory?
Yes, you can use that or GetActorProperty(0, APROP_TARGETTID), which should do the same thing if your actors have unique TIDs. I'd use the latter as the former can cause problems when you want to revert back to the activator and if you don't have unique TIDs distributed.FranckyFox2468 wrote: ↑Fri Dec 01, 2017 8:39 pmWait really? Cause i did some testing involving target-based trigger on death at somepoint and the item was given to the player it was last attacking/facing rather than the killer.
Are you sure there isn't something more to it?
EDIT:
Oh wait... SetActivatorToTarget... nevermind. Thanks for the help.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===