SetPlayerEnemy - Faction

Member of: Faction Script

Sets or clears the enemy flag from this faction for the player.

SyntaxEdit

Function SetPlayerEnemy(bool abIsEnemy = true) native

ParametersEdit

  • abIsEnemy: True if the player should be flagged temporarily as an enemy of the faction, false to clear the enemy flag.
    • Default: True

Return ValueEdit

None.

ExamplesEdit

; Set the faction's enemy flag
BadGuys.SetPlayerEnemy()


; clear the faction's enemy flag
BadGuys.SetPlayerEnemy(false)

NotesEdit

This is the same flag that gets set on a faction when the player commits a crime against it, which allows a faction to attack the player even if the player is an ally of that faction.

The flag is automatically cleared (whether set by script or code) after 24 hours.

See AlsoEdit