How to make a skill that attacks enemies also apply a state to all allies?

Status
Not open for further replies.

KrimsonKatt

Pyromancer
Veteran
Joined
Nov 12, 2016
Messages
154
Reaction score
70
First Language
English
Primarily Uses
RMMV
Right now I'm making a skill that's supposed to cast instant death on all foes, but inflicts the entire battle party with a state that causes them to gain no EXP to balance it out. I already have the formula in the damage formula in order to apply the state to the user (a.) or the target(s), (b.) but don't know how to apply the state to all battle party members. I think it's something with javascript and $Battle_Party something-or-other but since I don't know Javascript I will need someone to help me with the formula so I don't mess anything up while trying to guess what the formula actually is. Any help would be appreciated. Thanks.
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
852
Reaction score
536
First Language
English
Primarily Uses
RMMV
There's not a single statement to apply something to the entire party, so the usual code looks something like this:
JavaScript:
$Game_Party.members().forEach(function(a) {a.addState(yourStateIdHere)})
This is a bit cumbersome, but it should do the trick.

Another option that's mechanically similar is to change your skill so instead of causing instant death, it applies "Special Effect: Escape", which causes the enemies to disappear without giving XP or items. While the effect isn't the same, it's easier to create.
 

KrimsonKatt

Pyromancer
Veteran
Joined
Nov 12, 2016
Messages
154
Reaction score
70
First Language
English
Primarily Uses
RMMV
Thanks for the help! Appreciate it!
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,471
Reaction score
5,300
First Language
english
Primarily Uses
RMMZ

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Hello I buyed RPG Maker VX Ace a long ago and I want to use it again but in the meantime I changed my pc but I lost the paper with my product key on so I can't use RPG maker again... someone can help me please ? or there is no hopes ?:'( ( I have a bad english I'm sorry )
I was away this days here in the forum but it was for a good cause!
The trailer of the demo of Luke Inn is on youtube and I am so happy!
I need to see the bugs of the game but I am happy that I have new content to show!

The last part of the modern interior will be ready soon. This will be a B-tile. With interior items for the kitchen, bathroom, toilet and storage room.
This frantic shooting ARPG plugin for MZ looks really great. Here is the link to a post from the official Japanese RPG Maker forum.
We start in 5 minutes!

Forum statistics

Threads
102,940
Messages
996,117
Members
134,392
Latest member
Niko44
Top