User talk:Lisselli
Revision as of 14:48, 6 November 2016 by imported>Lisselli
Sandbox Page for when I need to post code on the forums. Because it doesn't allow indention..
Function AdvanceSkillEx(String asSkillName, Float afValue, Int aiClampValue=0)
if (bLockLevel == true)
; Let's say Player is level 50. This variable will store that.
CurrentPlayerLevel = PlayerRef.GetLevel()
debug.notification("CurrentPlayerLevel: " +CurrentPlayerLevel)
; Lock this level so its not updated, UNLESS the player levels up and becomes higher than this value.
else
CurrentPlayerLevel = PlayerRef.GetLevel()
bLockLevel = true
endif
;If the player is still level 50. Keep counting the times advance skill was called.
if CurrentPlayerLevel == PlayerRef.GetLevel()
if iCount != aiClampValue
Game.AdvanceSkill(asSkillName, afValue)
iCount += 1
debug.notification("iCount: " +iCount)
; Everytime advanceskill is called, iCount goes up until it reaches the clamp value.
endif
endif
EndFunction