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
Marking Quest Complete
Re: Marking Quest Complete
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;
}
float arcadeScore = DialogueLua.GetVariable("Arcade_score").AsFloat;
float playerScoreFloat = (float)score;
if (score >= arcadeScore)
{
arcadeScore = playerScoreFloat;
}
Re: Marking Quest Complete
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:
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.
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();