SetPlayerTeammate - Actor

Revision as of 05:11, 2 September 2019 by imported>Thesparalius (→‎Parameters)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: Actor Script

Flags this actor as a teammate of the player or not. Once an NPC becomes a teammate, the following becomes true:

  1. NPC will sneak if the player sneaks, stop sneaking if the player stops sneaking.
  2. NPC will draw a weapon if the player draws a weapon.
  3. NPC will equip their best armor (instead of wearing their default Outfit)
  4. Crimes committed by the NPC are considered crimes the player has committed.
  5. (Optional) NPC can be issued commands.

SyntaxEdit

Function SetPlayerTeammate(bool abTeammate = true, bool abCanDoFavor = true) native

ParametersEdit

  • abTeammate: Whether to set or clear the actor's teammate status.
    • Default: True
  • abCanDoFavor: Whether to set or clear the actor's ability to do favors when they are the player's teammate.
    • Default: True

Return ValueEdit

None.

ExamplesEdit

; Set Buddy as a teammate
Buddy.SetPlayerTeammate()


; Clear buddy's teammate status
Buddy.SetPlayerTeammate(false)

See AlsoEdit