MZ How to get Enemy and actor's X and Y position during action sequence?

I'm trying to make an action sequence like Mario fires the fireball, which is that the fireball will bounce against the ground once and hit the enemy. I think if I get the X and Y position of the enemy and my actor, I can make the fireball bounce against the middle ground between the enemy and my actor with projectile. Can anyone tell me how to get those information? I've checked the script data, the $game things, but I don't know which is the one I need.

This is what I'm trying to do.

fireball.png
Assuming you are using Visustella plugins, you can get the actor's coordinate using the skill with:
Code:
$subject.battler().x;
$subject.battler().y;
And you can get the target's x and y with:
Code:
$target.battler().x;
$target.battler().y;
Wow, thank you very much. That's exactly what I need. Now my fireball goes one the right trajectory. Really appreciate. Thank you. 😀

Oh, could you tell me what the enemy and my actor's width and height?
Is it something like $subject.battler().width ?

Assuming you are using Visustella plugins, you can get the actor's coordinate using the skill with:
Code:
$subject.battler().x;
$subject.battler().y;
And you can get the target's x and y with:
Code:
$target.battler().x;
$target.battler().y;
Wow, thank you very much. That's exactly what I need. Now my fireball goes one the right trajectory. Really appreciate. Thank you. 😀

Oh, could you tell me what the enemy and my actor's width and height?
Is it something like $subject.battler().width ?
Yup that seems to work.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-enemy-and-actors-x-and-y-position-during-action-sequence.151369/