Autorun Common Event Trigger Condition

Hi,

I want to set up a common event that triggers when you sleep (at the inn or whatever). The common event switches off fatigue-related switches (like you can only ask a clerk to write a letter for you once a day, or something) and also adds +1 to a variable keeping track of "mission days".

The common event is set to auto-run and should trigger when the switch "everyone sleeping" is switched on.

Spoiler: SCREENSHOT
1687919322300.png

Below is an event at one of the inns. It switches 0011 on, in the hopes of triggering the event, but nothing happens. I'm a little confused as to why this is... I suspect that both the ON and OFF of the Control Switches is executed simultaneously, but even then the common event should still be called since 0011 is ON at one point.
Spoiler: SCREENSHOT
1687919439392.png

Any ideas? Thanks for taking the time to read!
There's actually no need to do that. You can cal the common event directly in your event via the event command call common event. Then the trigger can even be set to none as it will run when called.
Why don't you just manually call that common event in the sequence of commands under the item check?
I suppose I could do that 😊
... but since the "everyone sleeping" needs to be switched on anyway (it triggers a mini-sleeping cutscene), I thought it would make sense to have everything in one place.

EDIT: naturally this works, but I still don't understand why invoking it via a switch doesn't work, so if anyone can explain I would greatly appreciate it.
EDIT: naturally this works, but I still don't understand why invoking it via a switch doesn't work, so if anyone can explain I would greatly appreciate it.
If an event is currently running on the main interpreter (a.k.a. the event is not parallel), the engine doesn't check whether or not any new autorun common event trigger conditions are met, since it can't run any new autorun events at that time anyway. It only checks whether or not autorun trigger conditions are met when it is actually an appropriate time to activate a new autorun event.

Since you are turning the switch back off before the current event has finished, the switch is already off before the check occurs.
Okay that means it should work if I placed the "switch 0011 OFF" part to inside the common event?

EDIT: works like a charm! Thanks a lot!
Spoiler: SCREENSHOT
1687926286025.png

1687926356813.png

Original thread: https://forums.rpgmakerweb.com/threads/autorun-common-event-trigger-condition.158761/