Moving an event via chaging scene manager values?

I would guess the answer is no, but is it possible to move an event around on the map via its coordinates in the scene_manager?

For example, event 001's (an NPC) coordinates are:

SceneManager._scene._spriteset._characterSprites[0].x

SceneManager._scene._spriteset._characterSprites[0].y

Would changing these cause the event on the map to relocate if I changed the X/Y values?

If so, what would be the command for changing these?
Why would you want to do it in the scene manager? That looks after the title screen, ALL maps, battles, menus, the lot, without getting into the nitty gritty of any one of them, which is what you're proposing. Why would you want a class to do a check on a map event when that map isn't even loaded, or when you're not even ON a map?

As always, explain WHAT you are trying to achieve, or WHY, rather than diving straight into the HOW, then people will be able to give you a far, far better approach. I question why you would want to do this in a script at all.
Why would you want to do it in the scene manager? That looks after the title screen, ALL maps, battles, menus, the lot, without getting into the nitty gritty of any one of them, which is what you're proposing. Why would you want a class to do a check on a map event when that map isn't even loaded, or when you're not even ON a map?

As always, explain WHAT you are trying to achieve, or WHY, rather than diving straight into the HOW, then people will be able to give you a far, far better approach. I question why you would want to do this in a script at all.

For example, I'd like to take an NPC (on a map) and launch it backwards. Not as a movement route, but make it look like it was just struck by something and flung away, and I'd like to do so without it being bound to the normal movement grid (with the option of flinging it offscreen as well).

It may very well be that the scene_manager isn't the place to do this, and I'm of course open to suggestions.
When you say "without it being bound to the normal movement grid" do you mean you want the sprite to shoot off at an angle?
When you say "without it being bound to the normal movement grid" do you mean you want the sprite to shoot off at an angle?

Correct.
Yeah, the scene manager isn't the place to do it - you should get to know the classes well before modifying them - it's like saying you want to put something in a state note to do something to an animation - they have nothing to do with each other.

The positioning of character sprites is done by Sprite_Character. To get the position, it looks at Game_CharacterBase (the base class of all the events, player, followers and vehicles) and calls the functions to return the screen coordinates where the sprite should go. These functions(one for X, one for Y) do calculations based on the current tile and the scroll position of the map (how far is the top left corner of the map from the top left corner of the window).

You could make a plugin that will allow you to use a plugin command or a script call to set the x and y position into new Game_CharacterBase variables, and if those are set, to use them, and if they're not, to do the default calculations. There'd have to be something in there that would modify the event's x and y (tile) positions accordingly, or you might have weird things happening with collision (it'd still think it was on the original tile), and it might also snap back to the original location when you reset the override x and y positions.

I started to do up a simple plugin, but realised it would take a bit of mucking around to avoid those issues, and I don't have time to nut it out. But at least you know where the changes need to be made and how it gets the coordinates.
Ah yes, this...

There'd have to be something in there that would modify the event's x and y (tile) positions accordingly, or you might have weird things happening with collision (it'd still think it was on the original tile), and it might also snap back to the original location when you reset the override x and y positions

...Is what I thought might be the case: just moving the visible part of the sprite on the screen wouldn't necessarily also move the collision box and whatnot.

I started to do up a simple plugin

Ack, I don't want to be THAT much trouble. I appreciate the thought, but there are other ways around this I can think of, they're just not as convenient.

I'll probably go with drawing a picture of the sprite over the sprite before making the event transparent, moving the picture, how and where I'd like it to go, then having a parallel process that moves the event to the new location before making it visible again.

Thanks again, as always, for helping me better understand the inner workings of the engine because I'm still (slowly) learning the bells and whistles. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/moving-an-event-via-chaging-scene-manager-values.75584/