MV How do I make an enemy attack and run away in the same skill?

I'm trying to make an enemy who does the following:
  1. runs up a player
  2. attacks
  3. keeps going until they're off screen
  4. flees from battle once off screen
I've gotten the first 3 to work via Action Sequences, but I can't find any plugin or tool for this.
You could probably call a common event at the end of your skill that uses force action to execute a different skill that has the escape sequence and escape battle action effect I'd say.

Alternatively, since you can run js evals in Action Sequence, you can probably just run some kind of battler.escape eval and achieve the same thing.
@SGHarlekin That's almost exactly it.

@silent_drew Try just putting as the last command of your action sequence:
Code:
eval user.escape()
Moved to: Plugin Support
@SGHarlekin That's almost exactly it.

@silent_drew Try just putting as the last command of your action sequence:
Code:
eval user.escape()
Haha couldn't find it right away on the script call document, but I wanted to at least point in the right direction. Glad you're here as usual to save the day 😀

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-an-enemy-attack-and-run-away-in-the-same-skill.158213/