MV How to display picture 1 on top of picture 2?

Under normal circumstances, if the pictures overlap, picture 1 will be covered by picture 2.
How can I make Picture 1 jump to the top of Picture 2 when player click on Picture 1? Don't be covered by Picture 2?
(YEP_PictureCommonEvents plugin is in use)
Under normal circumstances, if the pictures overlap, picture 1 will be covered by picture 2.
How can I make Picture 1 jump to the top of Picture 2 when player click on Picture 1? Don't be covered by Picture 2?
(YEP_PictureCommonEvents plugin is in use)
Does picture 2 have a common event also?
Sadly this does make a difference...
Picture sprites using common events are stored in a separate array.

Edit:
Created a plugin for this...

Note/Requirement:
Only works for Pictures with Common Event settings setup though...
...but you can work around this my setting any of the settings to -1 😉

Script Call:
Code:
CTB.SwapPictures(Picture ID A, Picture ID B)
Example:
Code:
CTB.SwapPictures(1, 2)

1600357479223.png


CTB_YEP_PictureCommonEvents(MV) Addon Demo: Click Here to Download

YEP_PictureCommonEvents NOT included.
Requires YEP_PictureCommonEvents.js to be placed into the plugins folder.

Please try it out and see if that works for your needs.
seems usefull, but also swapping without common event (unless this require different plugin?)
Does picture 2 have a common event also?
Sadly this does make a difference...
Picture sprites using common events are stored in a separate array.

Edit:
Created a plugin for this...

Note/Requirement:
Only works for Pictures with Common Event settings setup though...
...but you can work around this my setting any of the settings to -1 😉

Script Call:
Code:
CTB.SwapPictures(Picture ID A, Picture ID B)
Example:
Code:
CTB.SwapPictures(1, 2)

View attachment 161047

CTB_YEP_PictureCommonEvents(MV) Addon Demo: Click Here to Download

YEP_PictureCommonEvents NOT included.
Requires YEP_PictureCommonEvents.js to be placed into the plugins folder.

Please try it out and see if that works for your needs.
Thank you for such a good job.
But in fact, I want to put the clicked picture on all pictures, instead of only the No. 2 picture. However, sometimes I am not sure what the highest picture ID in the scene is, so if this plugin allows the player to click on any picture Can be displayed on the top of other pictures is the best
Thank you for such a good job.
But in fact, I want to put the clicked picture on all pictures, instead of only the No. 2 picture. However, sometimes I am not sure what the highest picture ID in the scene is, so if this plugin allows the player to click on any picture Can be displayed on the top of other pictures is the best
No prob. 🙂👍

Updated to v1.10:
CTB_YEP_PictureCommonEvents(MV) v1.10 Addon Demo: Click Here to Download
  • No longer requires the "-1" trick.
  • Now has a new script call to place the image on top of all pictures.
    • CTB.PictureToTop(pictureId)

Demo requires YEP_PictureCommonEvents.js to be placed in js/plugins folder. (Not included in demo)

Let me know if that suits your needs :popcorn:
No prob. 🙂👍

Updated to v1.10:
CTB_YEP_PictureCommonEvents(MV) v1.10 Addon Demo: Click Here to Download
  • No longer requires the "-1" trick.
  • Now has a new script call to place the image on top of all pictures.
    • CTB.PictureToTop(pictureId)

Demo requires YEP_PictureCommonEvents.js to be placed in js/plugins folder. (Not included in demo)

Let me know if that suits your needs :popcorn:
Thank you for your work, but I found that after clicking different pictures multiple times, a very confusing situation appeared. As shown in the figure below, it seems that the clicked picture cannot be placed on the top...

2020-09-24 22-52-55_20200924230540.gif

Original thread: https://forums.rpgmakerweb.com/threads/how-to-display-picture-1-on-top-of-picture-2.127430/