Hi.
Probably its best to do this in the Animator and use bools.
You can then use "Set Animator Bool" to set to true or false
For Example :
object2 is active, then set object2 bool to true
Then in the transitions you can use the conditions to select the needed animation.
for Example :
object2 and 3 are active (and set to true)
the transition that has 2 conditions (object 2 and 3) and both are true, will go to the connected state(animation)
You can find several tutorials on youtube for the animator.