Page 1 of 1

Update Variable in Quest Entry

Posted: Tue May 07, 2019 3:28 pm
by Timeslip
Hi Tony,

Am working on a simple quest that requires you defeat x enemies. Would like to avoid destroying the gameobjects (hence can't use increment on destroy script) so have incremented the relevant variable manually:

Code: Select all

int numberIncapacitated = DialogueLua.GetVariable("DragInhabitantsIncapacitated").asInt;
            numberIncapacitated++;
            DialogueLua.SetVariable("DragInhabitantsIncapacitated", numberIncapacitated);
Have confirmed the variable is increasing, but the quest entry UI text is not reflecting the changes. Do I need to call a method to update this?

Re: Update Variable in Quest Entry

Posted: Tue May 07, 2019 6:26 pm
by Tony Li
Yes, call DialogueManager.SendUpdateTracker(). This sends an "UpdateTracker" message to any UIs that listen for it, such as the quest tracker HUD and the quest log window.

Re: Update Variable in Quest Entry

Posted: Wed May 08, 2019 6:58 am
by Timeslip
Cheers, Tony.