Different commands for the same skill

Hello, the issue I'm having I think its pretty simple but I can't figure it out. I'm using the Plugins yep_battleengencore and actseqpack 123. While using the basic attack skill, I wanted my sv battlers to move closer to their target to look like they are actually hitting the target. The script I'm using works except I have a ranged class and it looks weird when a Ranged class runs up to an enemy and shoots them HAHA. I wanted to know if there is a way to move only the actors that are mele type, so if I attack with the basic attack skill, the ranged classes will just fire from the distance they are at. Here is the script I'm using.

<Target Action>
move user: target, front, 30
wait for movement
motion swing: user
perform action
action animation: target
wait for animation
action effect: target
death break
perform finish
</Target Action>

Database.png
I was always wondering about that as well. Second the question. I hope it’s very simple to solve
Couldn't you just add Melee Attack and Ranged Attack as different skill and don't use movement? No need for extra logic in script?
Couldn't you just add Melee Attack and Ranged Attack as different skill and don't use movement? No need for extra logic in script?
I could but the issue is the attack skill im referencing is the one that starts off in the battle menu where it says "Attack, Gaurd, Skill Magic." Im not sure how to edit that.
This is the code i tried to work with as an example of what i'm trying to do.
<target action>
if user.attackMotion() !== 'missile'
motion swing: user
perform action
action animation: target
wait for animation
action effect: target
death break
perform finish
else
move user: target, front, 30
wait for movement
motion swing: user
perform action
action animation: target
wait for animation
action effect: target
death break
perform finish
end
</Target Action>

however, the code doesn't work and the actors with the ranged weapon still moves.
EDIT:
So, I ended up fixing it on my own by messing around with that above script and came up with this-

<target action>
if user.attackMotion() !== 'missile'
move user: target, front, 30
wait for movement
motion swing: user
perform action
action animation: target
wait for animation
death break
perform finish
else
wait for movement
motion swing: user
perform action
action animation: target
wait for animation
action effect: target
death break
perform finish
end
</Target Action>

Original thread: https://forums.rpgmakerweb.com/threads/different-commands-for-the-same-skill.85900/