StealthDick Posted July 30, 2022 Share Posted July 30, 2022 I don't even know how to phrase this. I would like to create an event handler that runs a UDF whenever the player commits a crime against someone. I'm not sure if it's even possible though. Crimes being: Theft, Murder, and Assault. If I can't do that, I would atleast like to know if theres some variable in the game settings that gets temporarily changed to signify whether or not the player just committed a crime in general. There's gotta be a way I can jury-rig this into existence. Link to comment Share on other sites More sharing options...
Radioactivelad Posted July 31, 2022 Share Posted July 31, 2022 (edited) There's built-in reaction topics for when an NPC notices the player trespassing, assaulting, murdering, stealing, and etc. Couldn't you just use those to trigger whatever it is you're wanting to happen next? Edited July 31, 2022 by Radioactivelad Link to comment Share on other sites More sharing options...
StealthDick Posted July 31, 2022 Author Share Posted July 31, 2022 I tried, but the dialogue response doesnt fire 100% of the time. I also want to focus on the players victims, its typically the hr bystanders who bark the line. Link to comment Share on other sites More sharing options...
IntenseMute Posted August 2, 2022 Share Posted August 2, 2022 (edited) To detect a murder by the player character you can setup an OnDying event handler to detect any death that occurs.Then you simply check to see if the player character is the cause of death by using GetActorCrimePlayerEnemy, GetActorFactionPlayerEnemy and IsKiller.I do exactly this in my mod Leave No Witnesses. You can detect if the player has stolen from or assaulted an NPC using the GetActorCrimePlayerEnemy function but I don't recommend it due to it being unreliable. Edited August 2, 2022 by IntenseMute Link to comment Share on other sites More sharing options...
Recommended Posts