public bool animationTrigger = true
....
if (animationTrigger == true){
Animation.play(WalkingAnimation);
}
In your case you just need to create 3 boolean variables and set them to “true” OnTriggerEnter or OnTriggerStay, and set to false on OnTriggerExit. Then check whatever the boolans are true or not.
something like:
public bool animationTrigger1 = false;
public bool animationTrigger2 = false;
public bool animationTrigger3 = false;
...
if (animationTrigger1 == true && animationTrigger2 == true && animationTrigger3 == true){
ObjectToAnimate.animation.Play("DoorOpen_IN");
}
and on the collider something like
void OnTriggerStay (Other Collider){
if(Other.gameObject.tag == "Player"){
//turn trigger value to true
Player.animationTrigger1 = true;
}
}
void OnTriggerExit (Other Collider){
if(Other.gameObject.tag == "Player"){
//turn trigger value to false
Player.animationTrigger1 = false;
}
}
This is sample code, you need to create the final script yourself.