Background for Fallout 4
Member of the Faction script
voidfunctionSetPlayerEnemy(boolabIsEnemy=true)Native

Description

Wiki Description

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

Documentation Comment

Sets or clears the player as an enemy of this faction


Caveats

CK Wiki - Notes

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.


Parameters

boolabIsEnemy=true

CK Wiki Description

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

  • Default:True

Examples

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

Auto-Generated Example

bool myBool__abIsEnemy

myFaction__toCallFunctionOn.SetPlayerEnemy(myBool__abIsEnemy)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.