Picture Keep Coordinates

I have a bit of a problem with pictures.
I have one of the pictures moving on a parallel process, so the picture will move continuously while the cut scene is happening.

However, at one point of the cutscene, I want the picture to change from Image1.png to Image2.png

Is there a way to have rpg maker take note of where the picture is currently so Image2.png will appear in the same position that
the picture was when it was still Image1.png?
You could use variables to get the picture's coordinates immediately before changing it, and then use those variables in the next Show Picture command, though I'm not sure how that will affect the parallel process that moves the picture.

The other method could just be changing the picture's name via a script call, rather than using a new Show Picture command - that way, all the other things SHOULD stay the same. Assuming you're using MV (you might want to put that in your profile), the command would be something like:

$gameScreen.picture(id)._name = Image2

where id is the id you used in the original Show Picture command, with no leading zeros. Try the picture name, in quotes, without the .png extension first. If that doesn't work, try it with the extension.

The potential issue with this is that there might be a loading delay, which could cause the picture to disappear between changing the name and it being fully loaded.
$gameScreen.picture(id)._name = Image2

Works with quotes. 🙂

Question, though: could I take the picture ID from a specific variable, here?

For example: $gameScreen.picture(gameVariables[2])._name = Image2

That script is wrong, but is that possible to do?


Never mind, I figured it out!

$gameScreen.picture($gameVariables.value(X))._name = "image_name"

...Will allow you to select the picture ID based upon a variable, which will save me from having to create a fairly massive array of events. 😀

Thanks, Shaz, for providing a solution to a problem I didn't even I know I had!
Try the picture name, in quotes, without the .png extension first.

Yes, I did say to use quotes.

$gameScreen.picture($gameVariables.value(2))._name = "Image2"
Ha! You beat my edit by minutes! Thanks again!

Original thread: https://forums.rpgmakerweb.com/threads/picture-keep-coordinates.83831/