Page 1 of 1
Marking Quest Complete
Posted: Mon Sep 16, 2024 5:02 pm
by jrose1184
Hi i have created a qeust where a number should be greater then 70. But i need to use it on a mini arcade game where i need to beat the high score. So how can i do this through code?
this is my quest entry
[var=Arcade_score]/69
Re: Marking Quest Complete
Posted: Mon Sep 16, 2024 5:34 pm
by jrose1184
I tried to do this but it didnt work
float arcadeScore = DialogueLua.GetVariable("Arcade_score").AsFloat;
float playerScoreFloat = (float)score;
if (score >= arcadeScore)
{
arcadeScore = playerScoreFloat;
}
Re: Marking Quest Complete
Posted: Mon Sep 16, 2024 8:55 pm
by Tony Li
Hi,
Are you trying to set the value of the "Arcade_score" Dialogue System variable in a C# script? If so, use DialogueLua.SetVariable(). Example:
Code: Select all
DialogueLua.SetVariable("Arcade_score", 70);
DialogueManager.SendUpdateTracker();
The second line (SendUpdateTracker) sends an "UpdateTracker" message to the Dialogue System that tells the quest tracker HUD to update itself with any new values.