This function is defined at /src/EventCallerCore.c, in which “ParentProc” is current proc (we will block it during EventEngine exists) and pEventCode is just the pointer to your own event code.
Here is an example on making a little modification to the wait action:
and
Then set the event code as this:
Finally you will get Eirika moved and see a Text when you choose Wait:
I’m not sure I understand, aren’t there already vanilla functions to invoke the event engine?
void CallMapEventEngine(const void* scene, int runKind);
Is at 0x800D07C for example, seems to me to be handling the same input and giving the same result?
The original idea on introducing blocking proc is to set a flag for judgement. Function “CallMapEventEngine” introduce event engined by locking the game logic rather than blocking current proc, which means it may be complicated to get the working status of the current proc. by introducing a block proc, as I thought, we can then check for proc status directly by function “ProcFindBlocking” without having to set other complicated judgments. In my opinion, this is a simple and crude method, and can ensure to avoid false judgments (for example, in some cases, it is just the EventEngine that are calling our proc).
Besides, calling event engine is not just only this function alone. For example, what if you want to set or judge the event flag?
In my opinion, the currently provided modifications have a lot of room for expansion. For example, when calling Event Engine inside proc, adding an additional process of determining Flag, etc., instead of just calling the function “CallMapEventEngine”.