How do you kill an npc after a scripted_sequence Created 7 months ago2023-09-23 23:49:45 UTC by Rockit Rockit

Created 7 months ago2023-09-23 23:49:45 UTC by Rockit Rockit

Posted 7 months ago2023-09-23 23:49:45 UTC Post #347877
Hi, I'm trying to have an animation where a monster_barney is dragged into a hole in the wall and then dies after the animation is complete. I'm using a multimanager to make this work. Here's what it looks like:

multi_manager
Keyvalues:
trigger_Barn 1 (the trigger_once that activates the scripted_sequence)
deadbarney 2 (the scripted_sequence in question)
Deadguy 2 (the monster_barney himself, I don't know why I put this in here tbh)
Rockit Rockit"I been through the desert on a horse with no name..."
Posted 7 months ago2023-09-24 04:55:03 UTC Post #347879
Go to your scripted_sequence, and in KillTarget add the monster_barney.
Posted 7 months ago2023-09-25 06:33:56 UTC Post #347883
Using KillTarget will remove the monster from the game instead of killing it, which may or may not be what you want depending on whether you want it to leave a corpse or not.

If you want it to leave a corpse, the most consistent way would be using the 1000 event at the end of the animation's sequence (event 1000 tells the game the actor died on the event's frame). If the animation doesn't already have this event and if you're making a mod you can modify your mod's barney model directly, or if making a map pack you may make a copy and name it something else.

A less reliable way would be using trigger_hurt with a high damage and non-gibbing damage type (e.g. DROWN),
or if you want the monster gibbed you can just use KillTarget as above and target a gibshooter/env_shooter which should be more reliable than using trigger_hurt.
Posted 6 months ago2023-09-29 21:38:28 UTC Post #347888
There's an AI animation event for this, AFAIR.
You must be logged in to post a response.