jbtwist

Veteran
Veteran
Joined
Jun 4, 2017
Messages
49
Reaction score
6
First Language
Spanish
Primarily Uses
RMMV
Hi guys, I wanted a boss to attack multiple times per turn because of reasons, so I thought to code some skills to it like this:

<Target Action>
move user: targets, front, 20
wait for movement
motion attack: user
wait for motion
attack animation: target
wait for animation
action effect
wait for action
COLLAPSE: target
</Target Action>

<After Eval>
var id = user._enemyId;
var skill = 108;
var target = -1;
BattleManager.queueForceAction(user, skill, target);
</After Eval>

My problem is, that if after the first skill the character dies, the skill is going to be used again in him, because my character doesn't collapses untill the 2nd skill is performed.

Some1 knows how to fix this?
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
402
Reaction score
224
First Language
English
Primarily Uses
RMMV
It looks like you're using a plugin for this. We don't know what it is. We also don't know what skill 108 is or does.

However, I would suggest using an if statement to check the target is alive within your <After Eval> block, if it is, evaluate what you already have. I wouldn't know how to check the target is alive myself using a script, but I would imagine this is how it would look:

Code:
<After Eval>
if (target._hp > 0) {
   var id = user._enemyId;
   var skill = 108;
   var target = -1;
   BattleManager.queueForceAction(user, skill, target);
}
</After Eval>

Substitute in the correct code for the check, I doubt what I've used is correct.
 

jbtwist

Veteran
Veteran
Joined
Jun 4, 2017
Messages
49
Reaction score
6
First Language
Spanish
Primarily Uses
RMMV
It looks like you're using a plugin for this. We don't know what it is. We also don't know what skill 108 is or does.

However, I would suggest using an if statement to check the target is alive within your <After Eval> block, if it is, evaluate what you already have. I wouldn't know how to check the target is alive myself using a script, but I would imagine this is how it would look:

Code:
<After Eval>
if (target._hp > 0) {
   var id = user._enemyId;
   var skill = 108;
   var target = -1;
   BattleManager.queueForceAction(user, skill, target);
}
</After Eval>

Substitute in the correct code for the check, I doubt what I've used is correct.

Yeah, I am using STB, ive been searching and ive found a little fix using ITB plugin, but I need a quick fix on it to do as I wish, I hope DreamX reads my post and wants to do it, I think wont be hard for him. If not, I am gonna try that, is not the best solution, but I think will work
 

Latest Threads

Latest Profile Posts

My Overworld might be a mix of inspiration from 2D Final Fantasy games, Breath of Fire, Battlechasers: Nightwar, Super Mario World, and Pillars of Eternity. If I can make it more in-depth than just walking from point A to point B, that might do a lot for the gameplay experience. Hmm...
Terribly depressed. Worst birthday I've had in years, no motivation to work on anything. Still no income. At least I've got my computer running again.
Doing RPG Maker News for 19th September 2021

Stream will be live with some Dark Souls 3, followed by a session of the Interactive Text Adventure! Feel free to drop by!

Forum statistics

Threads
115,205
Messages
1,088,016
Members
149,780
Latest member
hutbephothuyhoang
Top