RPG Maker Forums

Okay, so my skill is designed to do random elemental damage to the enemies it targets. I'm having an issue with the variable getting set prior to the first use of the skill. The first time the skill is used it does not show the animation that I've assigned and is not doing the force element command within whole action, it is just doing the damage calculation in the damage formula box. After the first use, however, the skill works as intended.

Here is the note tag for the skill. Plugins involved are Yanfly Battle Core, Action sequences, element core, and skill core.
Code:
<Pre-Damage Eval>
$gameVariables.setValue(21, Math.randomInt(4) + 1)
</Pre-Damage Eval>
<whole action>
if $gameVariables.value(21) === 1
  // Change to Fire element
  force element: 2
  animation 36: targets
else if $gameVariables.value(21) === 2
  // Change to Water element
  force element: 3
  animation 34: targets
else if $gameVariables.value(21) === 3
  // Change to Air element
  force element: 4
  animation 40: targets
else if $gameVariables.value(21) === 4
  // Change to Earth element
  force element: 5
  animation 38: targets

end
action effect
clear element
wait for animation
</whole action>
<target action>
</target action>
I believe the issue is with the skill core note tag. Currently it is set to Pre-Damage Eval, but I've also tried Before Eval and it did not make a difference.

My work around is an autorun event that sets the variable with a script call and erases itself. However, if anyone knows why this is not working the first time the skill is used, I would like to understand. Thank you.

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top