... Do note that the Story Manager only auto-fills aliases when the quest first starts up, so you'll probably have to periodically stop and restart the quest to update the actors in the RefCollectionAlias. ...
IDontEvenKnow - Do you have a short example of how you would periodically start and restart the quest? I imagine it would involve the use of StartTimer(), but I have been having trouble getting it to reliably work. How would you do it? ... Looking for some best practice advice here because how I am doing it is likely not.
This is what I was trying below. Maybe I need to be doing SecretFormula_QuestScript.Reset(), etc.? Or maybe my script code extending Quest needs to match the Quest name: SecretFormula_Quest ? LMK. Thanks!
Scriptname SecretFormula_QuestScript extends Quest import MCM Quest Property SecretFormula_Quest Auto Const int timerId = 8675309 Const Function CheckRunning() If SecretFormula_Quest.IsRunning() Debug.Notification("Secret Formula is running") Else Debug.Notification("Secret Formula is not running") EndIf EndFunction Function ForceRestart() SecretFormula_Quest.Reset() EndFunction Event OnQuestInit() Debug.Notification("Secret Formula Initializing") EndEvent Event OnReset() SecretFormula_Quest.Stop() SecretFormula_Quest.Start() StartTimer(MCM.GetModSettingInt("louisthird_SecretFormula", "iSecretFormulaRefreshTimeInSeconds:Main"), timerId) EndEvent Event OnQuestShutdown() CancelTimer(timerId) EndEvent Event OnTimer(int aiTimerId) If aiTimerId == timerId SecretFormula_Quest.Reset() EndIf EndEvent
Edited by louisthird, 12 August 2020 - 03:50 AM.