How do I make the action work in both cases and not go crazy?

Upfront: Sorry for the uninformative title.

How do I…

The action I need to trigger is the “Changes the context of Object” action (see screenshot 2).

When the action is triggered directly with the button (see screenshot 1), it works as expected. However, I want it to happen not with the push of the button, but after the “Recruit x Die” action is completed. So at the end of this action, I set the boolen Switch.ReturnGreen to true. I see the exact same log entries, so I am 100% sure that the action is being triggered and also that the right instances are selected, but for whatever reason, the change context action just does not happen in the second case. Whatever else I put in there works (e.g., changing instance variables), just this single action not.

Please help, this is driving me nuts!

What is the expected result

I can trigger the action via the boolean.

What is the actual result

Everything gets executed besides the action when using the boolean to trigger the action.

Related screenshots

Where the action gets called:

The actual action:

I was able to solve it by introducing a 0.2 wait action, however, I still don’t understand why. :man_shrugging: