Maybe someone can help me out with a little issue I've been running into for a quest I've been trying to implement.
I'm working on a mod where the player fights several waves of enemies until they are able to defeat the final boss. Since it like an arena of sorts, I decided I wanted to have the player be "penalized" for losing the fight. My thought process was to have a script be executed when the player dies, then they are teleported to an XMarker I have set in a separate Interior Cell. This is what I had written and compiled:
Scriptname MMUROnDeathTeleport extends Actor
Actor Property PlayerRef Auto
ObjectReference Property MMURPenaltyBoxMarker Auto
Event OnDeath(Actor akKiller)
if akKiller == Game.GetPlayer()
I have both the player and Xmarker defined as properties, and I have the script attacked to a Quest Alias linked to the player. This compiles, but does not work in game. I have not added the lines that Fail the quest on death, or have it be running only during the quest, but I think I understand how to implement those. The big issue is just getting the OnDeath event to actually run.
Does anyone have any suggestions of how to get this to work? Or could there be an easier way to do this, such as having it run when the player gets to 1 HP instead of actually dead.
Thanks in advance!