MZ Call common event before the spell is cast

I'm using Visustella.
I figured out it would (should) be between these tags

<JS Pre-Start Action>

<JS Pre-End Action>

But what's the line to call the common event in question?
well for MV its:
$gameTemp.reserveCommonEvent(n);

also for MV if using "yeps skillcore" the <Custom Execution> note for skills and items triggers right BEFORE skill/item usage.. and thats better than using a CE at that point, because CE might wait for other action chains to finish first.. while <Custom Execution> doesnt wait when using script there, it will trigger immediately.
---

for mz it should be something similar..(sry i dont know much about MZ)
but this leads to the scriptcall list:
http://forums.rpgmakerweb.com/index...r-mv-script-call-list/?view=findpost&p=466673

there common events for MZ are only shown by replicating the script which is used on the event commands:
(not sure if that can be used for your pourposes)
Screenshot_1.png

Screenshot_2.png


.. however i guess there should be a scriptcall in MZ that is pretty similar written to the MV-"$gameTemp.reserveCommonEvent(n);" because both JS usage are pretty similar..
.. i just dont know it
@dopan - it's $gameTemp.reserveCommonEvent(id) for MZ as well. That can be found in the Script Call List sheet, in the "Events & Interpreters" section (currently line 565). The first few sections (Page 1~3) are for event commands:

scriptCallListToC.jpg

(I wondered if that would cause confusion, putting everything on one sheet.)

That may not work, though, since by default the troop event interpreter only processes during certain phases. If that's the case, you could try using an action sequence to run a common event mid-action, or see if you can find a plugin written specifically to run an event just before an action is performed.
if you can go into JS you can also manipulate the "gameActionApply" function similar how most "steal"-plugins are working.. in order to trigger something at the right timing.. but it could require as much work as a little plugin build would need.

This MV plugin does something similar (using "Game_Action.prototype"):

- just incase someone needs a plugin reference to see what i meand..
I tried this.

<JS Pre-Start Action>
$gameTemp.reserveCommonEvent(60);
<JS Pre-End Action>


The common event never happens.
I tried this.

<JS Pre-Start Action>
$gameTemp.reserveCommonEvent(60);
<JS Pre-End Action>


The common event never happens.
did you try putting other script into <JS Pre-Start Action> like "gainhp" or whatever..?
(in order to see if using "<JS Pre-Start Action>" is the right approach for your purpose,regarding timing ect)

it could be possible that <JS Pre-Start Action> doesnt work like you think it should , and you might need another solution..
(i dont use any Visual stellla plugins thats why i have no idea on this.. im just guessing)

edit.
also i know that "$gameTemp.reserveCommonEvent(id)" sometimes triggers later cose it has to wait for current action chains to finish.. but if you say it doesnt happen at all , not even later .. that should mean that somehow the code was never executed..
yanfly had a specific notetag to trigger common events in action sequences, exactl because the reserve common event function only lines the common event up for later execution and doesn't execute immediatly.

I suggest checking visustella if they adapted that tag as well.

Original thread: https://forums.rpgmakerweb.com/threads/call-common-event-before-the-spell-is-cast.151606/