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
165
Reaction score
72
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
869
Reaction score
553
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
165
Reaction score
72
First Language
English
Primarily Uses
RMMV
Thanks for the help! Appreciate it!
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,486
Reaction score
5,314
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 Posts

Latest Profile Posts

I worked a lot more today and I am thinking about Youtube videos to make to my channel, but I am still looking for some content :D

But I am happy to be back at work :D
Update... no scam calls all day. I think they learned their lesson. And I'm working on a fake anti-piracy video, featuring a fan game I'm making in MV. If I had the permission to make the game a licensed game that I could sell (rather than having it totally free like fan games are required to be), I'd use a really cool anti-piracy screen...
People2_1 added! ( with alternative hairstyle )

Hey there fellow makers!

just looking for an excuse to post this, really... :kaoslp:

Forum statistics

Threads
104,356
Messages
1,005,794
Members
135,867
Latest member
JJTG15092003
Top