Difference between revisions of "HasPerk - Actor"
Jump to navigation
Jump to search
imported>Qazaaq |
imported>Qazaaq |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:Papyrus]] | [[Category:Papyrus]] | ||
'''Member of:''' [[Actor Script | '''Member of:''' [[Actor Script]] | ||
Checks to see if this actor has the given Perk. | Checks to see if this actor has the given Perk. | ||
Line 18: | Line 18: | ||
== Examples == | == Examples == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; Does the | ; Does the actor have the perk? | ||
Function Example(Actor akActor, Perk akPerk) | Function Example(Actor akActor, Perk akPerk) | ||
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.") | ||
Else | |||
Debug.Trace("The actor " + akActor + " does not have the " + akPerk + " perk.") | |||
EndIf | EndIf | ||
EndFunction | EndFunction |
Latest revision as of 01:54, 13 June 2016
Member of: Actor Script
Checks to see if this actor has the given Perk.
Syntax[edit | edit source]
bool Function HasPerk(Perk akPerk) native
Parameters[edit | edit source]
- akPerk: The Perk to check.
Return Value[edit | edit source]
Whether the actor has the given Perk or not.
Examples[edit | edit source]
; Does the actor have the perk?
Function Example(Actor akActor, Perk akPerk)
If (akActor.HasPerk(akPerk))
Debug.Trace("The actor " + akActor + " has the " + akPerk + " perk.")
Else
Debug.Trace("The actor " + akActor + " does not have the " + akPerk + " perk.")
EndIf
EndFunction