So, I am following this tutorial below, and am a little confused.
https://adventurecreator.org/tutorials/manipulating-variables-through-scriptDo we replace the "_id" with the ID number? Or do we keep it, and add the ID at the end?
For example would be....
AC.GlobalVariables.GetBooleanValue (int 0);
or
AC.GlobalVariables.GetBooleanValue (int _0);
or
AC.GlobalVariables.GetBooleanValue (int _id 0);
Or do we not manipulate that line at all and add a new one below?
Do I need to add anything at the top of the script for the variables to work. Example "using AC"?
If anyone has an example of how one of these variables look in a script, that would also be helpful!
Thanks, everyone!
Comments
Yes - "_id" is the expected integer. If you were getting the Boolean variable with an ID of 2, the code would be:
AC.GlobalVariables.GetBooleanValue (2);
AC uses the "AC" namespace, but the line above implies it. You can do without "using AC;" at the top, but writing it then means you can write the code as:
GlobalVariables.GetBooleanValue (2);
Thank you!