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,297
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

Recent threads, and my very poor algorithm for my minimap plugin have made me face the fact that I need to review algorithms and such.

Going through Cracking the Coding Interview now. I am so excited.
Kes
I've seen a reference to a Community Lighting plugin for MZ, but cannot find it. Is it still in beta?

Todo:
Add fog of war
Add enemy indicators
Make window draggable
Optimise map drawing algorithm (5 seconds to load the map you see, so it's a... poo-poo algorithm)

Any suggestions? :kaoblush:
bleh studio hell job haha at least they like it didnt had time to do much laundry tho ;w;'....YES I DO AT LEAST TAKE A SHOWER everyday!
Ami
--- Food Ingredients ---

Hero: Since the Chef are in Hospital,we can't eat his Dish in 3 Days.
F.Mage: What we have to Eat?
M.Healer: Don't worry,we can Eat the Food Ingredients.
Hero & F.Mage
: Really?

(3 Days Later)

Chef: Hi,Guys. I'm Ba---
(Entire Party Collapse After Eat Raw Meat)
Chef: Wha...WHAT GOING ON HERE!!!!!!

Forum statistics

Threads
102,913
Messages
995,914
Members
134,361
Latest member
cribo65
Top