Re: [glob2-devel] Hints support in USL + questions
From:
Bradley Arsenault
Subject:
Re: [glob2-devel] Hints support in USL + questions
Date:
Tue, 21 Oct 2008 11:37:35 -0400
in Game Objectives, void setObjectiveComplete(int n); void setObjectiveIncomplete(int n); void setObjectiveFailed(int n); void setObjectiveHidden(int n); void setObjectiveVisible(int n);
Are the five most important functions. You can also expose, for scripting purposes, the data-retrieving functions
However! The problem here is that n isn't the exact number as seen by the script, like 1,2,3 ... 16. N is just an index of the object. The script sees the "script numbers", which are the ones shown in the GUI, and are set and retrieved by
void setScriptNumber(int n, int scriptNumber); int getScriptNumber(int n);
This is why in SGSL, the setObjectiveComplete functions and such look through all of the objectives to find one with a matching 'script number'