YEP Action Sequences - Check for Element Absorption? [Solved]

Status
Not open for further replies.

AdamSakuru

[Null_Value]
Veteran
Joined
Mar 14, 2014
Messages
314
Reaction score
170
First Language
English
Primarily Uses
N/A
EDIT:
This is solved. The solution for anyone wondering is this:
PHP:
if (target.result().hpDamage <= 0)
 [things]
end


I have my action sequences set up so that targets hit by skills/attacks will go into (and hold on) a shaking damaged pose until they are to act (or until the turn ends). One little problem is that if an enemy absorbs an element type, they won't take damage and will absorb the attack, but will still proceed to act as if they have taken damage by going into the damage pose.

Would anyone know how to check, inside of an action sequence with an IF eval, if the target of a skill absorbed the action effect/damage?

I see things like:
target.result().missed
target.result().evaded
target.result().critical

Is there something similar to any of those?
 
Last edited:

zaraku

Time Keeper
Veteran
Joined
Apr 19, 2018
Messages
49
Reaction score
39
First Language
English
Primarily Uses
RMMV
Try target.result().barrierAffected or target.result()._barrierAffected.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,562
Reaction score
1,033
First Language
EN
Primarily Uses
RMMV
Haven't tested, but this may be worth a try:
Code:
target.result().hpDamage > 0
 

AdamSakuru

[Null_Value]
Veteran
Joined
Mar 14, 2014
Messages
314
Reaction score
170
First Language
English
Primarily Uses
N/A
Haven't tested, but this may be worth a try:
Code:
target.result().hpDamage > 0
I'm pretty sure this doesn't work, I actually already have it as a condition to check in most of my action sequences (alongside seeing if the attacked missed or anything like that.)

The reason is that even if an enemy absorbs an attack when it lands, the DAMAGE was still not 0.
 

zaraku

Time Keeper
Veteran
Joined
Apr 19, 2018
Messages
49
Reaction score
39
First Language
English
Primarily Uses
RMMV
Does this require YEP's plugin for absorption barriers?
Oh, my bad. I don't use element absorption so I thought you were talking about absorption barriers. This is for that plugin only.
 

AdamSakuru

[Null_Value]
Veteran
Joined
Mar 14, 2014
Messages
314
Reaction score
170
First Language
English
Primarily Uses
N/A
@caethyril
So it turns out you were actually right!

Here's how I had my action sequence set up:
PHP:
<target action>
zoom: 200%, 13
CAMERA FOCUS: target, CENTER, 13
wait: 11
motion spell: user, no weapon
if (!target.hp < 1 && target.isEnemy())
 animation 81: target
 else
 animation 81: target, mirror
end
reset camera: 1500
zoom: 150%, 800
wait: 18
action effect
if (target.result().missed || target.result().evaded || target.result().hpDamage <= 0)
else
   if (user.isEnemy())
    ADD STATE 26: target
   end
  shake screen: 6, 9, 20
   if (!target.hp < 1)
    jump target: 24%, 15
    float target: 10%, 9
    motion damage: target, no weapon
    FACE target: FORWARD
    wait: 3
    FACE target: FORWARD
    wait: 5
    float target: 0%, 6
    wait: 2
    float target: 0%, 6
    jump target: 20%, 11
    shake screen: 3, 5, 13
  end
 end
reset camera: 800
zoom: 150%, 500
wait: 7
float target: 0%, 12
wait: 8
float target: 0%, 6
 if (user.isEnemy())
 move user: home, 15
 REMOVE STATE 26: target
 end
</target action>

My project has gone through a bunch of changes and one of those changes was editing how the enemy would move in response to damage. In the past I had them move backwards, but this would cancel the damage pose so I had to set it again afterwards. This was the reason it wasn't appearing to work. (Now they just kind of jump in response to damage without moving backwards.)
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
6,513
Reaction score
4,419
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Are there any vocalists on RPG Maker Forums that would want to sing together in a group, duet or make a whole channel together?
Here it is in all its leggy glory! I apologize in advance.
Suggestion for the name for the new RM, RPG Maker Re-MV (Re-Mastered Version)

Forum statistics

Threads
98,176
Messages
950,103
Members
129,474
Latest member
jacktarma
Top