Difference between revisions of "GetPlayerExperience - Game"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Lisselli
(created page)
 
imported>Lisselli
Line 28: Line 28:
== See Also ==
== See Also ==
*[[Game Script]]
*[[Game Script]]
*[[SetPlayerExperience - Game]]

Revision as of 09:52, 2 August 2017

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