sevencardz Posted December 30, 2017 Share Posted December 30, 2017 I had a similar problem where I needed to run a script only when the player goes to jail. To my chagrin, Actor.IsArrested() does not seem to work on the player. This thread was useful in helping me come up with the following work-around: ; Script attached to the player alias in a quest. ScriptName MyModPlayerAliasScript extends ReferenceAlias ; Returns true if the player is currently arrested. bool Function IsPlayerArrested() global Quest JailQuest = Quest.GetQuest("JailQuest") return JailQuest.IsRunning() && JailQuest.GetStage() != 100 EndFunction Event OnLocationChange(Location akOldLoc, Location akNewLoc) ; Fires when the player is moved to jail and again when the player is released or breaks out. if IsPlayerArrested() ; do stuff endIf EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts