Kcluuqczeas

Villager
Member
Joined
Mar 16, 2017
Messages
29
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
I think the title itself it's already a good explanation hehe!
How could I trigger a common event during a battle when all the enemies have a certain status?
For example, if you get to burn all the enemies at the same time, a common event triggers with an explosion that causes damage to all the enemies. Do I need a plugin to do that or it's enough with what rpg maker mv provides me?
Thanks
 

Pots Talos

Veteran
Veteran
Joined
Jun 28, 2012
Messages
172
Reaction score
169
First Language
English
Primarily Uses
RMMV
You can do this with checks inside the troop event. Making it a standard for all battles you will need a plugin like Yanflys Base Troop Event.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,875
Reaction score
974
First Language
English
Primarily Uses
RMMV
You can do this with checks inside the troop event.
How? The only way I can think of would be to have the skill that applies the status set a switch, which can then be checked for inside the troop event, see if the entire troop has it and toggle the switch back if not, but that's super cumbersome.

How could I trigger a common event during a battle when all the enemies have a certain status?
I would recommend using a plugin for it. Yanfly has a few that would work - the Buffs & States Core lets you specify a Custom Apply Effect that runs whenever the state is applied to a battler. Her Action Sequences also allow you to run code during a skill's activation.

Using an action sequence is more of a learning curve, but also is ultimately more flexible; using the Custom Apply is simpler, but you'll have no control over when within the skill it activates.

Either way, the code works the same way.
 

Pots Talos

Veteran
Veteran
Joined
Jun 28, 2012
Messages
172
Reaction score
169
First Language
English
Primarily Uses
RMMV
How? The only way I can think of would be to have the skill that applies the status set a switch, which can then be checked for inside the troop event, see if the entire troop has it and toggle the switch back if not, but that's super cumbersome.
I was thinking with something like this:

$gameTroop.aliveMembers().every(function(member) { return member.isStateAffected(X) })

I haven't tested this though so I could be wrong.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,875
Reaction score
974
First Language
English
Primarily Uses
RMMV
I was thinking with something like this:
The code is not the question - the event condition is the question. You wouldn't want to wait until the end of the turn to check, you'd want it to happen as soon as the last enemy gets the state.

That's not going to have any correlation to either actor or enemy hit points, either, so the only remaining trigger condition is, as I first mentioned, playing with a switch.
 

Pots Talos

Veteran
Veteran
Joined
Jun 28, 2012
Messages
172
Reaction score
169
First Language
English
Primarily Uses
RMMV
The code is not the question - the event condition is the question. You wouldn't want to wait until the end of the turn to check, you'd want it to happen as soon as the last enemy gets the state.
That's a good point, I wasn't even considering the timeframe for when the trigger would happen.
 

Bezhodeft

Beginner
Member
Joined
Apr 16, 2018
Messages
5
Reaction score
1
First Language
English
Primarily Uses
RMMV
How? The only way I can think of would be to have the skill that applies the status set a switch, which can then be checked for inside the troop event, see if the entire troop has it and toggle the switch back if not, but that's super cumbersome.


I would recommend using a plugin for it. Yanfly has a few that would work - the Buffs & States Core lets you specify a Custom Apply Effect that runs whenever the state is applied to a battler. Her Action Sequences also allow you to run code during a skill's activation.

Using an action sequence is more of a learning curve, but also is ultimately more flexible; using the Custom Apply is simpler, but you'll have no control over when within the skill it activates.

Either way, the code works the same way.
is there a way to force skill or playing common event with yanfly buff & states core ? i kinda want to make custom react effect with skill activation but i have no idea what to add except target.animation

EDIT : Nevermind i already found the solution , thankyou .
 
Last edited:

Latest Threads

Latest Profile Posts

Doing RPG Maker News for 26th September 2021

Well... it's been a while since I was last here :kaoswt: I don't want to say I'm officially 'back' yet, but I've recently started working with RM again, so I might become active here again :kaohi:
Mmmm I love Coca Cola candy! :kaoluv:
aaaand my power is out. I sometimes think that I'm cursed.

Forum statistics

Threads
115,386
Messages
1,089,489
Members
150,116
Latest member
Kinenveu
Top