enderalse/source/scripts/_00e_eponmagicalsymboldis.psc

62 lines
1.7 KiB
Plaintext
Raw Normal View History

Scriptname _00E_EPOnMagicalSymbolDis extends ObjectReference
{To be put onto a magical symbol and its light}
import math
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnActivate(ObjectReference akActionRef)
if DoOnce == False
Self.Disable()
Self.DisableLinkChain()
DoOnce = True
EndIf
if akActionRef == Game.GetPlayer()
_00E_MagicalSymbolsGlobalCollected.SetValue(_00E_MagicalSymbolsGlobalCollected.GetValueInt() + 1)
_00E_Levelsystem_MagicalSymbolCollected.Show(_00E_MagicalSymbolsGlobalCollected.GetValueInt(), 100)
_00E_MagicalSymbolSound.Play(Game.GetPlayer())
Self.GetLinkedRef().disable()
self.disable()
int EXPBonus = (_00E_MagicalSymbolsGlobalCollected.GetValueInt() * 2)
_00E_EPHandler.GiveEp(RewardExp+EXPBonus)
If _00E_MagicalSymbolsGlobalCollected.GetValueInt() == 100
Steam.UnlockAchievement("END_FETCHQUEST_01")
EndIf
endIf
endEvent
event OnLoad()
_00E_MagicLigthShader.play(self as objectReference)
endEvent
event OnUnload()
_00E_MagicLigthShader.stop(self as objectReference)
endEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
Int Property RewardExp auto
Bool DoOnce = false
GlobalVariable Property _00E_MagicalSymbolsGlobalCollected Auto
Sound Property _00E_MagicalSymbolSound Auto
Message Property _00E_Levelsystem_MagicalSymbolCollected Auto
EffectShader Property _00E_MagicLigthShader Auto