Difference between revisions of "HasPerk - Actor"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Qazaaq
imported>Qazaaq
Line 18: Line 18:
== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
; Does the player have the super perk?
Function Example(Actor akActor, Perk akPerk)
Function Example(Actor akActor, Perk akPerk)
{Does the actor have the perk?}
   If (akActor.HasPerk(akPerk))
   If (akActor.HasPerk(akPerk))
     Debug.Trace("The actor " + akActor + " has the " + akPerk + " perk.")
     Debug.Trace("The actor " + akActor + " has the " + akPerk + " perk.")

Revision as of 01:50, 13 June 2016

Member of: Actor Script

Checks to see if this actor has the given Perk.

Syntax

bool Function HasPerk(Perk akPerk) native

Parameters

  • akPerk: The Perk to check.

Return Value

Whether the actor has the given Perk or not.

Examples

Function Example(Actor akActor, Perk akPerk)
{Does the actor have the perk?}
  If (akActor.HasPerk(akPerk))
    Debug.Trace("The actor " + akActor + " has the " + akPerk + " perk.")
  EndIf
EndFunction

See Also