Difference between revisions of "GetLevel - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>EliRaven
imported>Rasikko
m (GetLevel only cares about the level displayed in the HUD/UI, not levels gained before going into the perk menu to actually level up.)
Line 22: Line 22:
endIf
endIf
</source>
</source>
== Notes ==
* Might be useful to know. Current is literal. If you have leveled up but have yet to go into the perk menu screen, this will still return your level seen in the HUD. To clarify, if you have accumulated tons of experience which would invoke several level ups but have no gone into the perk menu, this function will not display the level you WOULD be if you did.


== See Also ==
== See Also ==
*[[Actor Script]]
*[[Actor Script]]

Revision as of 07:58, 28 January 2019

Member of: Actor Script

Gets the actor's current level.

Syntax

int Function GetLevel() native

Parameters

None.

Return Value

The actor's current level.

Examples

; Print a message if Bob is higher level than the player
if (Bob.GetLevel() > Game.GetPlayer().GetLevel())
  Debug.Trace("Bob is higher level than the player!")
endIf

Notes

  • Might be useful to know. Current is literal. If you have leveled up but have yet to go into the perk menu screen, this will still return your level seen in the HUD. To clarify, if you have accumulated tons of experience which would invoke several level ups but have no gone into the perk menu, this function will not display the level you WOULD be if you did.

See Also