I've been making a library of common events that act as special types of spell effects. It appears that if I have more than one 'call common event' feature to a skill, it will only call the last event in the chain.
I can obviously work around this by just creating a single unifying common event that does both things, but that will mean making more total common events, and gumming up the clarity of the system. Is this a known issue? Maybe there is something I can do elsewise to fix it?
Note that both events are simple pass throughs to the script backend.
It's not a bug. That's the way the software is designed. You can only have one common event 'pending' at a time.
No, it's NOT a bug. That's the way it works. There is ONE slot for "common event waiting to be run". There is NO event queue system.
The fact that it doesn't work the way you'd LIKE it to work doesn't mean it's a bug 😉
lol. Saying it many times doesn't make you right.
Internally, everything is set up for ONE common event per skill. The software was very clearly designed to do this - if it wasn't, the script would use an array, and there would be logic to say whether to kick them all off at once or run them one after the other. The ability to use ONE common event per skill is a very definite decision made by the designers.
The fact that you WANT it to be able to handle more simply means you want something that it was not designed to do. In that case, list it in the 'suggestions for next RPG maker' thread, and/or modify the scripts to do it the way you want, but don't call it a bug, because it behaves exactly the way it was designed to behave 😉
You know, why not just, Call Common Event A and that Common Event A calls Common Event B.
Or a Common event that calls A and B.
lol - I never even SEE those things pop up!
I'm wondering if you can achieve what you're after by setting a switch (or switches) in your damage formula, having all of these skills call a single common event, and then have the common event poll the various switches and act appropriately for all the switches that are turned on (turning them off again afterwards). "Act appropriately" could either mean doing whatever processing you want to be done (which means JUST one common event for the whole lot), or calling other common events (which means as many common events as you were originally planning to set up, plus the one 'master' event that decides which of those to run).
If the damage formula is long enough, you could turn on a couple of switches (which would take the place of the couple of common events you want to set up as effects). I just don't remember how much text you can bung into that box.
(Edit: Oh, or what Zalerinian said 😉 )
Unless a script directly directly tries to access the common event, it should work fine. If you want I could write it to still work if they call $game_temp.common_event_id. Its really just a matter of four or so lines.
You should alias Game_Temp.initialize, not overwrite it, or none of the other init will be done.
If you want them in the order you put them in, change '@common_eveny_id.push(id)' in reserve_common_event to '@common_event_id.unshift(id)',and they'll be in order.
What's wrong with Archeia's advice though? Make the common event you call, call the other common events. And if you sometimes don't want to call a certain common event, use conditions to get around it.