Class PlayerCrimeData
Manages a player's criminal record, wanted level, and police pursuit state.
public sealed class PlayerCrimeData
- Inheritance
-
PlayerCrimeData
- Inherited Members
- Extension Methods
Properties
BodySearchPending
Whether the player is subject to a body search by police.
public bool BodySearchPending { get; }
Property Value
CurrentPursuitLevel
The current pursuit level (wanted level) of the player.
public PursuitLevel CurrentPursuitLevel { get; }
Property Value
EvadedArrest
Whether the player has evaded arrest (escalated from Arresting to NonLethal). This flag affects the severity of charges.
public bool EvadedArrest { get; }
Property Value
LastKnownPosition
The player's last known position to police. This is where officers will search if they lose sight of the player.
public Vector3 LastKnownPosition { get; }
Property Value
- Vector3
TimeSinceSighted
Time in seconds since police last saw the player. When this exceeds the search time for the current pursuit level, the pursuit ends.
public float TimeSinceSighted { get; }
Property Value
Methods
ClearCrimes()
Clears all crimes from the player's record.
public void ClearCrimes()
Remarks
This does not automatically end the pursuit or change the pursuit level. To fully clear wanted status, use SetPursuitLevel(PursuitLevel) with None.
Deescalate()
De-escalates the pursuit level to the next lower level.
public void Deescalate()
Remarks
Progression: Lethal → NonLethal → Arresting → Investigating → None. De-escalating to None will clear all crimes.
Escalate()
Escalates the pursuit level to the next higher level.
public void Escalate()
Remarks
Progression: None → Investigating → Arresting → NonLethal → Lethal. Escalating from Arresting to NonLethal marks the player as having evaded arrest.
GetSearchTime()
How long police will search for the player after losing sight, based on current pursuit level.
public float GetSearchTime()
Returns
- float
Search time in seconds.
RecordLastKnownPosition(bool)
Records the player's current position as their last known position to police.
public void RecordLastKnownPosition(bool resetTimeSinceSighted = true)
Parameters
resetTimeSinceSightedboolIf true, resets the time since sighted to 0 (police just saw the player).
SetPursuitLevel(PursuitLevel)
Sets the player's pursuit level (wanted level).
public void SetPursuitLevel(PursuitLevel level)
Parameters
levelPursuitLevelThe pursuit level to set.
Remarks
Setting to None will clear all crimes and end the pursuit. This method will not work during tutorial mode.