xcafe Posted December 15, 2016 Share Posted December 15, 2016 So I have this script, meant to activate an event when it's added to the player, but no dice. Any advice? Scriptname grimoire24script extends MagicEffect Form Property GrimoireSpellList Auto CentralListScript Property CentralQuest Auto Actor Property PlayerRef Auto Event OnEffectStart() Debug.Notification("Effect Started") RegisterForSingleUpdateGameTime(24.0) Debug.Notification("Effect Started, Registered") EndEvent Event OnUpdateGameTime() Debug.Notification("Removespells Called") Int ListSize = CentralQuest.GrimoireSpellList.GetSize() Int Index = 0 While Index < ListSize Form Entry = CentralQuest.GrimoireSpellList.GetAt(Index) If (Entry as Spell) PlayerRef.RemoveSpell(Entry as Spell) EndIf Index += 1 EndWhile Debug.Notification("Spells Removed") EndEvent P.S. The debugs aren't going off or anything either. Link to comment Share on other sites More sharing options...
NexusComa Posted December 15, 2016 Share Posted December 15, 2016 (edited) Sorry that was hurting my eyes ... :tongue:You do know that RegisterForSingleUpdateGameTime() is in hours ...So this will not fire for 24 hours (game time), once set.I'm not that good with spells so ... but it seems to me there is no effectto key off of for the Event OnEffectStart(). ;------ Scriptname grimoire24script extends MagicEffectForm Property GrimoireSpellList Auto CentralListScript Property CentralQuest AutoActor Property PlayerRef Auto Event OnEffectStart() Debug.Notification("Effect Started") RegisterForSingleUpdateGameTime(24.0) Debug.Notification("Effect Started, Registered")EndEvent Event OnUpdateGameTime() Debug.Notification("Removespells Called") Int ListSize = CentralQuest.GrimoireSpellList.GetSize() Int Index = 0 While Index < ListSize Form Entry = CentralQuest.GrimoireSpellList.GetAt(Index) If (Entry as Spell) PlayerRef.RemoveSpell(Entry as Spell) EndIf Index += 1 EndWhile Debug.Notification("Spells Removed")EndEvent Edited December 15, 2016 by NexusComa Link to comment Share on other sites More sharing options...
Recommended Posts