enderalse/source/scripts/ski_questbase.psc

42 lines
1007 B
Plaintext
Raw Normal View History

2021-10-10 14:17:11 +00:00
scriptname SKI_QuestBase extends Quest hidden
; -------------------------------------------------------------------------------------------------
; Version Tracking
;
; Quest implements
; GetVersion, to return the static version number
; OnVersionUpdate to handle the updating
; Update process is triggered by calling CheckVersion()
int property CurrentVersion auto hidden
function CheckVersion()
int version = GetVersion()
if (CurrentVersion < version)
OnVersionUpdateBase(version)
OnVersionUpdate(version)
CurrentVersion = version
endIf
endFunction
int function GetVersion()
return 1
endFunction
event OnVersionUpdateBase(int a_version)
endEvent
event OnVersionUpdate(int a_version)
endEvent
; -------------------------------------------------------------------------------------------------
; Reload Events
;
; Helper to add reload event to quest script.
; 1. Create quest
; 2. Add player alias to quest
; 3. Attach SKI_PlayerLoadGameAlias to player alias
event OnGameReload()
endEvent