Move an actor forward with <Custom Apply Effect> (Resolved)

Good morning,

I would like to know if it is possible to make an actor advance in combat with the <Custom Apply Effect> of the Yanfly plugin, in order to give the impression that he is launching a skill.

I know that asking for a solution without explaining the problem is not very appreciated on the forum so I will give you the context.
I managed to replicate the "Auto-Phoenix" ability from the Final Fantasy games. I never found a plugin for this so I tinkered with several common event and Yanfly plugins.
For information, Auto-Phoenix is a passive effect that allows an actor to automatically cast a resurrection item on another actor who has just died. A very powerful effect therefore.

As you know, in RPG maker, forcing an actor to do an action during a turn cancels the action he was supposed to perform normally.
I therefore chose to launch the item with another actor who does not exist in the game, and to animate the actor who owns Auto-Phoenix which gives the impression that it is him who uses the item .
I used this:

<Custom Apply Effect>
target.requestMotion('item')
</Custom Apply Effect>

Visually, I am very happy with the result. But I wonder if I can improve it by making the actor move forward as he would if he were really throwing an item.
Ideally I would like to use <Custom Apply Effect> but I don't know javascript at all. Everything I know, I copied it from the forum.
Can somebody help me please ?

For information, I did not detail the way in which I programmed auto phoenix because it was very long and I use a lot of common events, but if someone is really interested I would like to explain my method. You have to expect something complicated.

(Translation made by google, please ask me to rephrase if it is not understandable please)
The code to make that actor advance should be
Code:
target.battler().stepForward()

But I'm not sure of a good way to make the game pause for that step to happen before showing the item motion. And then you'll need to find a place to do target.battler().stepBack() or they'll be permanently displaced.

This might end up being easier to do by forcing an action that has Action Sequencing in it.
This seems to work the way I want it to.
I created two different states spaced 20 trams apart, so that the actor moves forward and then is animated.
I strangely didn't need target.battler().stepBack()
The illusion is perfect, thank you very much ^^
It's probably covered by the default action sequence in Yanfly's Battle Engine Core.

Glad you got it working. (although I have no idea what "states spaced 20 trams apart" means 🤣 )
Probably a translation error. I meant that I used the "Wait" function between the two states. And I put 20.

Original thread: https://forums.rpgmakerweb.com/threads/move-an-actor-forward-with-custom-apply-effect-resolved.167936/