GetPlayerExperience - Game

From the CreationKit Wiki
Revision as of 09:48, 2 August 2017 by imported>Lisselli (created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SKSE Member of: Game Script

Returns the current amount of experience for the current level. (This function requires SKSE.)

Syntax

Float Function GetPlayerExperience()

Return Value

  • Returns the current amount of experience for the current level.

Examples

Float Function GetExperienceRemaining()
	; returns the amount of experience remaining for the current level.
	Int CurrentLevel = Game.GetPlayer().GetLevel()
	Float CurrentEXP = Game.GetPlayerExperience()
	Float RequiredEXP = Game.GetExperienceForLevel(CurrentLevel)
	Float RemainingEXP = RequiredEXP - CurrentEXP
	
	return RemainingEXP
EndFunction

See Also