RMMV Count every succeeded action effect (Yanfly action sequence)

stramin

Veteran
Veteran
Joined
Nov 4, 2012
Messages
337
Reaction score
167
First Language
spanish
Primarily Uses
N/A
Hi!

I wonder how to count how many succeeded action effects a single attack makes... ok, an example, lets imagine I have this action sequence:

Code:
<Target Action>
perform action
motion wait: user
action animation
action effect
wait: 10
action effect
wait: 10
action effect

change variable 72 = {succeeded actions}

</Target Action>

As you can see, this skill makes 3 action effects, how can I count how many of them succeeded (damage greater than 0 (not missed)).

If any of these action effect misses I should get 2 on variable 72.

Do you know how to achieve something like this?

Thank you in advance!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,459
Reaction score
3,536
First Language
English
Primarily Uses
RMMV
Just use a variable to check the target's HP before and after each hit. You could use a game variable, but it's just as easy to make one on the battler.

Code:
<target action>
change variable 72 = 0

perform action
motion wait: user
action animation
eval: target.curr_hp=target.hp
action effect
wait: 10
if target.curr_hp!=target.hp
    change variable 72 += 1
end
eval: target.curr_hp=target.hp
action effect
wait: 10
if target.curr_hp!=target.hp
    change variable 72 += 1
end
eval: target.curr_hp=target.hp
action effect
if target_curr.hp!=target.hp
    change variable 72 += 1
end

</target action>
 

stramin

Veteran
Veteran
Joined
Nov 4, 2012
Messages
337
Reaction score
167
First Language
spanish
Primarily Uses
N/A
It works!

There is a little problem when the enemy dies on the first action, then its hp is 0, but it is ok for me.

Thank you so much! :kaojoy:
 

Latest Threads

Latest Profile Posts

So, yeah. It's there.

Clarn Hold
(No storylines)
There was a tutorial on how to draw anime eyes. Just draw Among Us. So I tried.
Screenshot_107.jpg
DamageActor3_7.png added!
index.php

Making a "characters first appearance" drawing for my game. Now I just have to finish the sprite art animation for her grand entrance.​

Forum statistics

Threads
125,540
Messages
1,171,821
Members
164,614
Latest member
guymelul
Top