Check if a target is hit by a skill/attack

Hi everyone,


First of all I'd like to apologize for 2 things: my bad English and my little knowledge on where I should post questions, please forgive me XD.


I'm using Yanfly Battle Engine Core plugin (using RPG Maker MV) and I'd like to create a custom action sequence for the base attack and I got a problem I can't solve: I want my charachters to display a Motion Target: Damage if they're hit or a Motion Target: Evade if they evade or the attack fails. I think a "if... else" condition should solve this, but I don't know what to put inside this condition. Here is the code I put in the notetags:


<Target Action>


perform start


immortal: targets, true


move user: target, front base, 5


wait for movement


perform action


action animation


wait for animation


action effect


-----------------------------> I think here is where I should put an if..else condition


immortal: targets, true


perform finish


</Target Action>


I've tried to look inside the rpg_objects js and I found a function(target) on line 1644 so I tried to write:


if result.isHit()


motion target: damage


else


motion target: evade


but it didn't work. I'm not a programmer so I'm sure I did something senseless but I don't know what to do and I need some help, please.


Thanks in advance.
I am having the same problem.

Motion Damage animation does not occur upon an SV being hit successfully, and same goes for evading. I have tried countless strategies for quite awhile myself, and it's getting a little silly now.
I asked the same question a little while ago... Cant seem to find the thread though :/ but i think its something like this. Its what i have and it seems to work 🙂

Edit : Found it https://forums.rpgmakerweb.com/inde...ction-sequence-plugin-help.91683/#post-832038

Code:
ACTION EFFECT: TARGET

IF target.result().evaded

motion target: evade

else

motion target: damage

END

Original thread: https://forums.rpgmakerweb.com/threads/check-if-a-target-is-hit-by-a-skill-attack.64761/