Difference between revisions of "SetPlayerTeammate - Actor"
Jump to navigation
Jump to search
imported>Plplecuyer (→Notes) |
(No difference)
|
Revision as of 11:18, 20 November 2015
Member of: Actor Script
Flags this actor as a teammate of the player or not.
Syntax
Function SetPlayerTeammate(bool abTeammate = true, bool abCanDoFavor = true, bool abGivePlayerXP = false) native
Parameters
- 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 he is the players teammate.
- Default: True
- abGivePlayerXP: Set this to true if you want this actor to give the player some experience points when another actor is killed or he is commanded to unlock something.
- Default: False
Return Value
None.
Examples
; Set Buddy as a teammate
Buddy.SetPlayerTeammate()
; Clear buddy's teammate status
Buddy.SetPlayerTeammate(false)
Notes
Once an NPC becomes a teammate, the following becomes true:
- 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. (they must have the DO_TEAMMATE_READY_WEAPON keyword on them to do this)
- NPC will equip their best armor (instead of wearing their default Outfit)
- Crimes committed by the NPC are considered crimes the player has committed.
- (Optional) NPC can be issued commands.