This may have been posted before.

I've been using this action sequence for my battles and it does everything I want it to, except that I want ranged fighters to stay back when attacking, but they don't. How do I fix that?

Code:
Skill #1 will be used when you select
the Attack command.

-----
<setup action>

immortal: targets, true

display action

</setup action>


<target action>

move user: targets, front, 15

motion missile: user

wait for movement

face user: target

motion thrust: user

wait: 10

attack animation: target

wait for animation

action effect

end

</target action>



<follow action>

face user: forward

jump user: 50, 20

move user: return, 20

motion escape: user

wait for movement

MOTION walk: user

immortal: targets, false

</follow action>
Well, "move user: targets, front, 15" is straight up moving the skill user to the front of the targets. What were you trying before?
Well I want to have the users moved to the targets unless they are ranged.
Then you need to make a second Action Sequence without that line. If it's the same attack, you'll have to make a similar skill with the same name.
Then you need to make a second Action Sequence without that line. If it's the same attack, you'll have to make a similar skill with the same name.

It's just the basic attack sequence. Can I put the same code without that line in the sequence?
I see. I'm not sure then what you can do. If there is a way to replace "Attack " with another command in the game. In which case, Scripting is the way to go, but I'm not quite that advanced yet.
You'll need an if statement to have a change in the same sequence. One common approach I've seen is if user.attackMotion() !== 'missile' -stuff- end.

Check the action sequence help thread and Yanflys site for documentation on things! It's a ton of help.
You'll need an if statement to have a change in the same sequence. One common approach I've seen is if user.attackMotion() !== 'missile' -stuff- end.

Check the action sequence help thread and Yanflys site for documentation on things! It's a ton of help.

Okay thanks. The next question I would have is where would I put this and what would I add in the -stuff- area? lol. I'm very new to this.
Put the if statement in Target Action, it works like the conditional branch in eventing.

So IF this is true THEN, end. If this is FALSE then else, end.

if user.attackMotion() !=='missile'
move user: forward, 15
motion missile: user
wait for movement
Action Animation
Action Effect
else

move user: target, 15
motion swing: user
wait for movement
Action Animation
Action Effect

end

Something like that. There may be massive typos and syntax errors here so don't copypaste directly. It's just an example.
Put the if statement in Target Action, it works like the conditional branch in eventing.

So IF this is true THEN, end. If this is FALSE then else, end.

if user.attackMotion() !=='missile'
move user: forward, 15
motion missile: user
wait for movement
Action Animation
Action Effect
else

move user: target, 15
motion swing: user
wait for movement
Action Animation
Action Effect

end

Something like that. There may be massive typos and syntax errors here so don't copypaste directly. It's just an example.

Thank you for your attempt to help, but I'm still not getting it to work the way I want it to. I'm just not as familiar with how everything works, so for some reason, I can't get it to work.
Please use meaningful thread titles in future. Key words that let us know immediately what it is you need help with.

Original thread: https://forums.rpgmakerweb.com/threads/this-may-have-been-posted-before.102131/