Difference between revisions of "HasPerk"

From GECK

(Updated HasPerk to use Function Template. Corrected information about return value)
(Returns 1/0, not rank)
Line 1: Line 1:
 
{{Function
 
{{Function
 
|origin = GECK1
 
|origin = GECK1
|summary = Returns the Actor's rank of the specified perk.  If the Actor doesn't have the perk, [[HasPerk]] will return 0.
+
|summary = Returns 1 if the actor has the specified perk and 0 if not.
 
|referenceType = Actor
 
|referenceType = Actor
|returnVal = perkRank
 
|returnType = int
 
 
|arguments = {{FunctionArgument
 
|arguments = {{FunctionArgument
 
     |Name = BaseID
 
     |Name = BaseID
Line 11: Line 9:
 
|example = player.HasPerk GunNut
 
|example = player.HasPerk GunNut
  
Returns the player's rank in the "Gun Nut" perk.
+
Returns whether or not the player has the "Gun Nut" perk.
 
}}
 
}}
  

Revision as of 19:17, 27 February 2009

A function included in the GECK version 1.1.0.36.

Description

Returns 1 if the actor has the specified perk and 0 if not.

Syntax

Actor.HasPerk BaseID:string

Example

player.HasPerk GunNut

Returns whether or not the player has the "Gun Nut" perk.

See Also

Personal tools