RPG Maker Forums

Link to the page here!

Hey, everyone!

For my game, I make use of these two pieces of code provided by Yanfly. The first sets up an attack that collects a status ailment, whereas the second injects it into an enemy. The way I intend things to work, the inject portion of this setup is meant to target all enemies. Therefore, the scope of the associated skill is set to 'all enemies'. Now, while the skill is indeed used on all targets, only one of them receives the status ailment.

<Custom Requirement>
// Default the current collected ailment for the user.
user._collectedAilment = user._collectedAilment || 0;
// Make sure the ailment ID is above 0.
value = user._collectedAilment > 0;
</Custom Requirement>

<Before Eval>
// Get the user's current collected ailment.
var stateId = user._collectedAilment;
// Add that ailment to the target.
target.addState(stateId);
// Remove the collected ailment from the user.
user._collectedAilment = 0;
</Before Eval>
I wonder if there is a simple solution to only have the status ailment be removed from the user's memory after all enemies have been afflicted with the status ailment. I have been playing around with the code some, but sadly this is not my strong point.

I am thankful for every bit of help or suggestions!

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,836
Latest member
T62352536256t362
Top