Picture Keep Coordinates

Karbonic

Off Brand OFF
Veteran
Joined
Dec 24, 2015
Messages
57
Reaction score
20
First Language
English
Primarily Uses
RMMV
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?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,847
Reaction score
12,257
First Language
English
Primarily Uses
RMMV
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.
 

JLowther

Veteran
Veteran
Joined
Feb 20, 2016
Messages
327
Reaction score
35
First Language
English
Primarily Uses
$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. :D

Thanks, Shaz, for providing a solution to a problem I didn't even I know I had!
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,847
Reaction score
12,257
First Language
English
Primarily Uses
RMMV
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"
 

JLowther

Veteran
Veteran
Joined
Feb 20, 2016
Messages
327
Reaction score
35
First Language
English
Primarily Uses
Ha! You beat my edit by minutes! Thanks again!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

The new intro Logo for my videos.

I speed it up, the one I use to use was to long.
The workweek is now over. Now I can work on my GamZzzzzZzzzzZzzzZzzZz....
Just watched Onward with the family. One of the best movies I've ever seen. <3
2 hours & 20 minutes remaining. :D
...trying to hurry finish up all commissions before I never put the controller down again ;)

Forum statistics

Threads
95,822
Messages
932,185
Members
126,254
Latest member
YKJordan
Top