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
171
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
60
Reaction score
47
First Language
English
Primarily Uses
RMMV
Try target.result().barrierAffected or target.result()._barrierAffected.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,093
Reaction score
1,509
First Language
EN
Primarily Uses
RMMZ
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
171
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
60
Reaction score
47
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
171
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
7,842
Reaction score
5,227
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 we allowed to post about non-RPG Maker games? And, if so, would any of you be interested in a short, proof of concept type non-euclidian puzzle game?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,883
Messages
1,017,234
Members
137,608
Latest member
Arm9
Top