Hi, I need to change the ac local variable by my script, and if the value = true then run cutscene.
Here is my actions:
1. Create local value in Game Editor > Variables and change initial value to false
2. Change local value in my script:
void OnMouseUp(){
AC.LocalVariables.SetBooleanValue (0, true);
}
3. Create OnVarChange in Game Editor > Scene > On Variable Change
4. OnVarChange:
Cutscene > When running: Run in Background
Action type > Variable: Check
Action type > if Condition is met: Run cutscene
5. In play mode when I click on my Object, local value is changing to true, but my cut scene doesn't run.
Can't figure out, what I am doing wrong?
Comments
But since you're already changing the variable's value through script, you can just add another line to run the Cutscene:
public AC.Cutscene myCutscene;
{
AC.LocalVariables.SetBooleanValue (0, true);
myCutscene.Interact ();
}
myCutscene.Interact ();
}