Jump to content

Recommended Posts

Posted

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.

Posted (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 by Radioactivelad
Posted
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.
Posted (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 by IntenseMute
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...