Forum rules - please read before posting.

Call object question

edited November 2017 in Technical Q&A
Hi there :)
This is a pretty dumb question but I'm having a problem with something
I'm trying to use script to check if an AC variable is true or false and then run something depending on the answer. I have the script in a gameobject.

I'm using Object: Call Object, in a file called testcheck.cs, but my function doesn't come up as an option under testcheck or GameObject;

void testcheck()
{
if (AC.LocalVariables.GetBooleanValue (13) == true)
{
print("it's true");
//code here
}
else if (AC.LocalVariables.GetBooleanValue (13) == false)
{
print("it's false");
//code here
}
}

Any idea what's happening? Thank you :)

Comments

  • It needs to be public - if you're not specific, it will default to private:

    public void testcheck()
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.