Is there a way to make it if something happens outside of a clip, something else will happen inside the clip?
If you want to be able to check a variable in an if statement inside a clip, using a variable from outside the clip you could declare the variable like this
var myVar = 100;
Then I think you should be able to use it in an if statement like this
if (myVar >= 80) {
console.log("success");
}
Although I haven’t tried this code so it might not work or be slightly wrong
You could use project variables if you don’t want to reference clips variables…
// outside your clip...
project.myVar = 3;
then, inside your clip you can monitor that variable to see if that value has changed. At your clip’s update tab:
if(project.myVar != 3) {
// do whatever inside your clip
}
or from “outside” you can check a clip (named: “myClip” that contain a variable named: “myClipVar”) :
if (project.myClip.myClipVar != 3){ // if variable myClipVar inside myClip is not 3
// do whatever outside your clip
}
What do you mean by 3?
It could be whatever value or variable you want to store, so you can access that later.
I don’t understand?
3 is just the != condition (for the event to happen).