MV Dynamically move actors in SV battle.

Hi I'm trying to make a unique skill in the sideview battle system where an enemy can "Grab" an actor which would should move that actor over to the enemies position. I found 2 plugins that changed actors positions, but Yanfly Battle Core didn't have a command to do it dynamically, and SVActorPosition's command didn't work in the battle itself. I don't need an animation to slide the character over, I just need them to appear by the enemy. Is there another plugin I can use for this, or can I modify one of these plugins?

Thanks!
I think you'll be able to do this with SVActorPosition's command plus an extra script call. I know I had it working in my Party Battle Formations plugin (unreleased, sorry).

I think the key is to call BattleManager._spriteset.createActors(), but I'm not quite sure. Try that as a script call after using SVActorPosition's plugin command and let me know how it goes.

If it works, great. If you end up with the actor duplicated (ie, they appear at both the old location and the new location), that's not too hard to fix. If nothing happens, I'll need to look a bit closer at my code and figure out what it did; it's been awhile since I wrote that.
It creates a duplicate actor. Also the new Actor ends up sliding towards the position rather then just appearing there.

I think you'll be able to do this with SVActorPosition's command plus an extra script call. I know I had it working in my Party Battle Formations plugin (unreleased, sorry).

I think the key is to call BattleManager._spriteset.createActors(), but I'm not quite sure. Try that as a script call after using SVActorPosition's plugin command and let me know how it goes.

If it works, great. If you end up with the actor duplicated (ie, they appear at both the old location and the new location), that's not too hard to fix. If nothing happens, I'll need to look a bit closer at my code and figure out what it did; it's been awhile since I wrote that.
Moved to: Plugin Requests
Both Battle Core and SV Actor Positions only do one particular thing- they change the actors' home positions only, but don't provide movement options.

Since it seems like you're interested in using Yanfly's Battle Core, I'd recommend Action Sequences (1, 2, 3), Pack #2 has movement options for both actors and enemies which you can flavour as grabbing. There's actually a whole thread dedicated to people posting their sequences so others can reference/use them, and it's possible a grab animation might already there, or a sequence you can edit to use for this.

If not actually interested in using any Yanfly Battle plugins, Victor has one with many of the same functionalities in one plugin (but it's possibly incompatible with Yanfly battle plugins). Though, It's not as robust as Yanfly's. And due to the popularity of Yanfly's, there isn't really a thread for referencing battle motions from Victor- you have to just kinda trial-and-error it until you get a reasonable result. But the upside is that his actually tend to be compatible with other battle plugins, unlike Yanfly's.
Also the new Actor ends up sliding towards the position rather then just appearing there.
I'm assuming the slide is something you want to avoid?

I believe this four-line script call should solve the duplicate issue but it'll probably still slide:
JavaScript:
var sprites = BattleManager._spriteset;
var field = sprites._battleField;
field.children = field.children.filter(s => !sprites._actorSprites.includes(s));
sprites.createActors();

Also, keep in mind that, as Ecalus says, SVActorPositions sets the actor's home position, so unless you set their position again at the end of battle, they'll start out next to the enemy in their next battle.
This worked!

I went and modified the game code a bit myself to remove the slide in effect, as well as movement for using skills.
I'm assuming the slide is something you want to avoid?

I believe this four-line script call should solve the duplicate issue but it'll probably still slide:
JavaScript:
var sprites = BattleManager._spriteset;
var field = sprites._battleField;
field.children = field.children.filter(s => !sprites._actorSprites.includes(s));
sprites.createActors();

Also, keep in mind that, as Ecalus says, SVActorPositions sets the actor's home position, so unless you set their position again at the end of battle, they'll start out next to the enemy in their next battle.

Original thread: https://forums.rpgmakerweb.com/threads/dynamically-move-actors-in-sv-battle.138387/