Difference between revisions of "SetPlayerTeammate - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
imported>Thesparalius
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
#NPC will sneak if the player sneaks, stop sneaking if the player stops sneaking.
#NPC will sneak if the player sneaks, stop sneaking if the player stops sneaking.
#NPC will draw a weapon if the player draws a weapon.
#NPC will draw a weapon if the player draws a weapon.
#NPC will equip their best armor (instead of wearing their default Outfit)
#Crimes committed by the NPC are considered crimes the player has committed.
#Crimes committed by the NPC are considered crimes the player has committed.
#(Optional) NPC can be issued commands.
#(Optional) NPC can be issued commands.
Line 18: Line 19:
*abTeammate: Whether to set or clear the actor's teammate status.
*abTeammate: Whether to set or clear the actor's teammate status.
**'''Default''': True
**'''Default''': True
*abCanDoFavor: Whether to set or clear the actor's ability to do favors when he is the players teammate.
*abCanDoFavor: Whether to set or clear the actor's ability to do favors when they are the player's teammate.
**'''Default''': True
**'''Default''': True



Latest revision as of 04:11, 2 September 2019

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.

Syntax[edit | edit source]

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

Parameters[edit | edit source]

  • 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 Value[edit | edit source]

None.

Examples[edit | edit source]

; Set Buddy as a teammate
Buddy.SetPlayerTeammate()


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

See Also[edit | edit source]