Forum rules - please read before posting.

AC variable c# scripting

Hey Chris! I was just wondering if there was much difference between these two ways of calling AC variables

Most of the time I am calling AC bools using these two functions

AC.GlobalVariables.SetBooleanValue (84, true);
m_Example = AC.GlobalVariables.GetBooleanValue (84);

However looking at the manual GVar is whats used (obviously covers more than just the Bool aspect). EG

m_Example= AC.GlobalVariables.GetVariable(84);

Is there any problems with what I'm doing? Have a few scripts using it, just making sure .

Comments

  • Both methods are viable - but with the latter you can cache a reference to the variable, which'll be faster if you're updating/reading it every frame.

  • Ah yep that makes sense. I am writing something right now that probably will find good use for that. Appreciate it like always!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.