Talk:Safely increment variable from multiple scripts
Jump to navigation
Jump to search
I couldn't compile the following example probably because GetOwningQuest() is not a member of ObjectReference script.
; RIGHT WAY
Event OnDeath(Actor akKiller)
; increment dead count
myQuestScript = GetOwningQuest() as MS06Script
myQuestScript.IncrementDeadCultists()
endEvent
However this method is working for me:
Scriptname SpawnChainSCR extends ObjectReference
qf_arenakurierquest_01049fca Property qArena Auto
Event OnActivate(ObjectReference akActionRef)
qArena.IncrementCombatants(2) ;thread safe method
EndEvent
Of course I have to assign the appropriate quest (arenakurierquest) to qArena in the Property Editor. --VikMorroHun (talk) 2013-07-28T08:59:11 (EDT)