How to force multi-hit skill to run common event everytime it hits?

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
Greeting!

Basically, a skill can call common event only once after hit regardless number of hit. Just wonder whether there is a way to make a multi-hit skill call common event every time it hits.

For example 3-hit skill will call a common event 3 times.
 
Last edited by a moderator:

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
I generally did it with a code snippet like this:

remembered_event = $game_temp.common_event_id$game_temp.reserve_common_event(35)SceneManager.scene.process_event$game_temp.reserve_common_event(remembered_event)This will remember whatever Common Event was queued, if any, then reserve the event you want to run with each hit, process it immediately, and then reserve the Common Event that was remembered (so that it's queued again).

You will probably want to stick this in an appropriate place in Game_Battler - possibly a method like make_damage_value if this skill does damage.
 

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
I generally did it with a code snippet like this:

remembered_event = $game_temp.common_event_id$game_temp.reserve_common_event(35)SceneManager.scene.process_event$game_temp.reserve_common_event(remembered_event)This will remember whatever Common Event was queued, if any, then reserve the event you want to run with each hit, process it immediately, and then reserve the Common Event that was remembered (so that it's queued again).You will probably want to stick this in an appropriate place in Game_Battler - possibly a method like make_damage_value if this skill does damage.
So your snippet will only work if the skill actually hits and does damage, won't it? That would be what I want for my project. One more question, if I would like to set for more common events that can be executed, how can I add it to your snippet. For example, skill A will run common event 1 while skill B will run common event 2.
 
Last edited by a moderator:

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
Bump, still need a way to do this.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
I've moved this thread to Script Request. Please be sure to post your threads in the correct forum next time. Thank you.


That requires a script to change the original behaviour, because by default the common events are only run once for the script.


You might be able to make something work with script calls in the damage formula, but for that you have to tell us what you want the CE do. If it does something complex, again you need a script to set it up (but call the script from the damage formula instead of a common event.
 

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
I've moved this thread to Script Request. Please be sure to post your threads in the correct forum next time. Thank you.

That requires a script to change the original behaviour, because by default the common events are only run once for the script.

You might be able to make something work with script calls in the damage formula, but for that you have to tell us what you want the CE do. If it does something complex, again you need a script to set it up (but call the script from the damage formula instead of a common event.
Thank you for moving this thread to correct forum Andar.

For my project, I design a state that enables player to auto cast attacking spell when the character uses attack command. This is easy just have a skill attack checks if state is true then call common event (to force auto casting spell on random chance).

And I would like to have multi-hit skill also can proc this auto spell as well but default game design will only trigger common event only once after action ends. I would like to have the skill calls common event right after each successfully hit.

Hopefully you see a clearer picture now.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top