Creating a skill that conditionally strikes again

JumbocactuarX27

Veteran
Veteran
Joined
Jan 11, 2013
Messages
86
Reaction score
39
First Language
English
I'm trying to make a skill that, if it kills an enemy, is used again free of charge. I'm using the yanfly engine plugin Skill Core which gives me an eval that triggers after the skill has completed. This seemed like a good place to start, so I looked up the script equivalent of the force action event and put that in there. What ends up happening is strange:

Why does it not kill the first enemy it hits (instead killing the second enemy)?

Why does it keep going after all enemies are dead?

And most importantly: is there a better way to accomplish this effect?

Here's the skill settings.

 
Last edited by a moderator:

JumbocactuarX27

Veteran
Veteran
Joined
Jan 11, 2013
Messages
86
Reaction score
39
First Language
English
Sorry for the double post, but I figured out what was going wrong and wanted to answer my topic in case someone stumbles upon this problem in the future.

Here is the correct way to create this skill:

Using Yanfly's SkillCore plugin, create the After Eval notetag with the following code:

if(target.hp <= 0 && !$gameTroop.isAllDead()) { $gameVariables.setValue(x, y);} Above, the x is the ID of the variable you want to save to and y is the actor you want to do the attack. Then you need to call a common event in the effects area of the skill editor. The common event should check the variable you set above in the After Eval notetag (represented above as 'x') and then force the skill.
 
Last edited by a moderator:

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

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,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top