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

aroha

Veteran
Veteran
Joined
Apr 29, 2019
Messages
38
Reaction score
7
First Language
Chinese
Primarily Uses
RMMV
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)
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
953
Reaction score
514
First Language
Javascript
Primarily Uses
RMMZ
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.
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,461
Reaction score
833
First Language
Dutch
Primarily Uses
RMMV
seems usefull, but also swapping without common event (unless this require different plugin?)
 

aroha

Veteran
Veteran
Joined
Apr 29, 2019
Messages
38
Reaction score
7
First Language
Chinese
Primarily Uses
RMMV
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
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
953
Reaction score
514
First Language
Javascript
Primarily Uses
RMMZ
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. :):thumbsup-right:

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:
 
Last edited:

aroha

Veteran
Veteran
Joined
Apr 29, 2019
Messages
38
Reaction score
7
First Language
Chinese
Primarily Uses
RMMV
No prob. :):thumbsup-right:

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
 

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

  • Latest Threads

    Latest Posts

    Latest Profile Posts

    I'm hoping to get a call October 1. They should be fully open by then.


    With this, all demo dungeon graphics are done.
    Eventually I need to make animations...send help.
    OcRam demo project is now available at https://ocram-codes.net !!!
    mzBaseBody.png added!

    Ami
    --- Mushroom ---

    F.Knight: We runs out the food!
    Hero: Anything could eat in this place?
    F.Archer: It's a bunch of Mushroom over there. I wonder it's safe to eat.
    F.Knight: No worries,we have to fill our inside no matter what it is.
    (Hero & F.Knight Eat The Mushroom,After 10 Seconds They Collapse With Foam)

    Forum statistics

    Threads
    103,447
    Messages
    999,372
    Members
    134,985
    Latest member
    REEEEEOOOOOOOOO
    Top