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 Posts

Latest Profile Posts

Us:
"This game is awesome! I wish there are more games like this in the future."
Also us:
"I hate how games stopped being original and start copying other successful games."
Should've done this a few days ago but...
PRI_200136808.jpg
Rest in Peace, Sir Clive Sinclair
1940 - 2021
Entrepreneur, Technologist, Father of the Modern British Computing Industry, and protagonist of Legend of ZUN.

Without you, England's games and tech industry wouldn't be where it is.
Woof, haven't touched any game-making elements in a couple of weeks I think.
Doing a thing in MV...

R3PuRjF.png

Forum statistics

Threads
115,285
Messages
1,088,629
Members
149,906
Latest member
MechaWitch
Top