GetXPForLevel - Game

From Creation Kit
Jump to: navigation, search

Member of: Game Script

Returns the total amount of XP required to obtain the specified level. This is not the amount of xp between two levels.

Syntax

int Function GetXPForLevel(int auiLevel) native global

Parameters

  • auiLevel: The level to get the required XP for.

Return Value

The amount of XP needed to go from level 0 to the specified level.

Examples

; Print out some XP stats
Debug.Trace("Level 2 requires " + Game.GetXPForLevel(2) + " XP in total")
Debug.Trace("To go from level 2 to level 4 requires " + (Game.GetXPForLevel(4) - Game.GetXPForLevel(2)) + " XP")

See Also