GetAllPerks

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns an array_var containing all perks the calling Actor reference has.

  • When called on the player, depending on the function's 1st argument, forTeammates, the result array will contain either the player's own perks, or the player's perks for active teammates.
  • When called on any other actor, the result depends on whether the uNPCPerks optional JIP LN feature is enabled or not.
    • If enabled, the array will contain all the perks owned by the actor (both startup and script-added perks). If a teammate and the argument is non-zero, the player's perks for teammates will also be included.
    • If disabled, the function will return a non-empty array if and only if the actor is a teammate and the argument is non-zero.
  • If the 2nd argument, includeHidden, is non-zero, all applicable hidden perks will be included in the result, as well.

Syntax

[help]
(allPerks:array_var) actorRef.GetAllPerks forTeammates:0/1 includeHidden:0/1

Example

let aAllPerks := player.GetAllPerks 0 1
let aAllPerks := actorRef.GetAllPerks 1