[C#] if statement, check of bool is 1 on another gameobject

During my learning C# process I’ve run into many stops :wink: #suprise /jk

anyway I can’t seem to find my way out of this one.

What happens :

The player walks through a invisible cube, when he does it sets a bool trigger (it works fine)
Now when the player reaches the secound trigger, i need to check if the first one actually was triggered or if he missed something.
I imagined.

if player has triggered object 1
work object 2

check the screenshot for understanding

	public GameObject firstCheckCube;   // <--------- THIS IS THE FIRST CHECKPOINT it has the trigger on it called "myTrigger"

	void OnTriggerEnter(Collider other) 
	{
                // This is the statement I need help with,   (if myTrigger = true then.....)
		// if(firstCheckCube.

		if(other.gameObject.tag == ("PushCubeControl"))
		{
			other.gameObject.SetActive(false);
			audio.PlayOneShot(Activate);
			Blockade.SetActive(false);
			EndCube.SetActive(true);

Any suggestions is appriciated, also interested if you would use something else to setup triggers like this.

public GameObject firstCheckCube = null;
     
void OnTriggerEnter(Collider other)
{
    if (firstCheckCube != null)
        // First "cube" was already encountered... Do something else.
    else if (other.gameObject.GetComponent<TwoX1CheckCube1>().myTrigger)
        firstCheckCube = other.gameObject; // First "cube" was never encountered. (I don't know what "myTrigger" does exactly...
     
    if (other.gameObject.tag == "PushCubeControl")
    {
        other.gameObject.SetActive(false);
        audio.PlayOneShot(Activate);
        Blockade.SetActive(false);
        EndCube.SetActive(true);
    }
}

Something like that?

I feel like I’m missing some info to help you properly. Feel free to add information into what you want exactly.

Yeah something like that…

Well myTrigger is just a bool 0 = not triggered, 1 = triggered
Will try to work with what you gave me there, seems to make sense…