MV - Changing Picture Z Index Value

● ARCHIVED · READ-ONLY
Started by Pherocity_Studios 9 posts View original ↗
  1. On the surface, I realize my question seems simple. This isn't about just changing which picture is above another. I'm wondering if it's possible to change the z-index of the entire picture layer. I know there are a few plugins that have done it for parallax mapping to show pictures below the player, or fogs that show above everything. The issue I'm having is I am using SumRndmDde's Hud Maker for RMMV, and I need to be able to put pictures above the HUD elements. I know that different parts of the game are broken up into different layers, so things go over and under things properly. But if there is a way to set the picture z-index to be above everything else, including the HUD elements, that would be fantastic!

    Extra points if it's possible to be able to make it so pictures 1-50 is on the default picture layer and pictures 51-100 are above all other elements! :kaopride:

    As a side note, the current solution I have to draw pictures above all other elements is this:
    JS Script
    JavaScript:
    window._picName = new Sprite(ImageManager.loadPicture("picture"));
    SceneManager._scene.addChild(window._picName);
    window._picName.x = $gameVariables.value(1);
    window._picName.y = $gameVariables.value(2);
    The only problem with this solution is I need to be able to move the picture around, following the player's mouse input. I tried setting variables for each image, but it looks really janky as it moves around, so the 'Move Picture' command is the best option.

    Thanks to anyone in advance that might know a good solution! Also if you're not sure on a solution, thank you for just reading this :kaophew:

    Example Images of Issue:
    Example 1
    example1.jpg
    Example 2
    example2.jpg

    How It Should Function:
    Example 3
    example3.jpg
    Example 4
    example4.jpg
  2. Hey @ct_bolt! I can always count on you to respond to my cries for help :kaoluv:

    I gave that script a try and it does indeed let me draw pictures over other pictures, (which is good stuff to know, I'll definitely be using that in other projects!) but it didn't solve the issue I'm having. The elements that are being drawn by the Hud Maker plugin are still being rendered over the picture elements.

    Spoiler
    exampleImage.jpg
    So there's the brown window and 3 purple cards that are all picture elements. The purple cards can be dragged around by the player. Then the name 'Skeleton', the red HP and green timer bars are all elements of the HUD Maker plugin. The issue is the HUD elements are being drawn over the cards that are being moved across the screen. So if I can draw pictures over every other element being rendered on the screen, that would be ideal.

    Spoiler
    exampleImage2.jpg
    This is ideally how it should look when dragging the cards around. If it's not possible (I know z-index stuff changed a lot with MV) I totally understand, I know that there are limitations with the engine. Just figured I'd see if anyone knew of a solution to change which things appear over other things :kaopride:
  3. Pherocity_Studios said:
    Hey @ct_bolt! I can always count on you to respond to my cries for help :kaoluv:
    :LZSproud:

    Pherocity_Studios said:
    I gave that script a try and it does indeed let me draw pictures over other pictures, (which is good stuff to know, I'll definitely be using that in other projects!) but it didn't solve the issue I'm having. The elements that are being drawn by the Hud Maker plugin are still being rendered over the picture elements.

    Spoiler
    View attachment 254122
    So there's the brown window and 3 purple cards that are all picture elements. The purple cards can be dragged around by the player. Then the name 'Skeleton', the red HP and green timer bars are all elements of the HUD Maker plugin. The issue is the HUD elements are being drawn over the cards that are being moved across the screen. So if I can draw pictures over every other element being rendered on the screen, that would be ideal.

    Spoiler
    View attachment 254123
    This is ideally how it should look when dragging the cards around. If it's not possible (I know z-index stuff changed a lot with MV) I totally understand, I know that there are limitations with the engine. Just figured I'd see if anyone knew of a solution to change which things appear over other things :kaopride:

    Ohhh gotcha okay.. so idealy you want all pictures to be on top of everything? Always?
    Just trying to see what the best approach is gonna be for this. I think I already have a solution ;)
  4. i made a plugin that can fix pictures on regions,, to do this i also needed the option to manipulate the z anchor..

    my plugin offers 2 Layer-options for z anchors on pictures.. the default and one extra for the region-pics.
    ( you can decide which z anchor is used ,in the plugin param)
    2023-02-23 22_37_31-Srpg-plugins_RG_Pictures.js at main · DopanPlugins_Srpg-plugins – Mozilla ...png


    however to do that i needed help in the first place.. here is a link to the thread where caethyril explained it to me:
    MV - "showPicture" anchor z change ??
    and here is the link to my plugin, incase you want to read the JS if that helps..:
    Rg_Pictures.js
    edit
    i am pretty sure ct_bolt, can build a better plugin for your purpose, which doesnt include the whole region stuff, and only manipulates the z anchor of pics..
    (but perhaps these infos might help)
  5. ct_bolt said:
    :LZSproud:



    Ohhh gotcha okay.. so idealy you want all pictures to be on top of everything? Always?
    Just trying to see what the best approach is gonna be for this. I think I already have a solution ;)
    In a perfect world it would be great to have like pictures 1-50 function like normal, and then pictures 51-100 be on top of everything all the time. Or maybe be able to switch the pictures layer back and forth through a script call or something :kaoblush:
    But if they just had to be on top of everything all the time, that would work too! :kaoluv:

    dopan said:
    i made a plugin that can fix pictures on regions,, to do this i also needed the option to manipulate the z anchor..

    my plugin offers 2 Layer-options for z anchors on pictures.. the default and one extra for the region-pics.
    ( you can decide which z anchor is used ,in the plugin param)
    View attachment 254125


    however to do that i needed help in the first place.. here is a link to the thread where caethyril explained it to me:
    MV - "showPicture" anchor z change ??
    and here is the link to my plugin, incase you want to read the JS if that helps..:
    Rg_Pictures.js
    I appreciate the post, however I'm not really working with regions to show pictures. It's a cool looking script though! But not exactly what I need (at least not by the looks of it anyway). Thank you though!
  6. Oh my holy moly goodness, THIS IS AMAZING! Thank you so much for this plugin, it works perfectly! I just did some testing with it and I couldn't find any issues with it! :kaoluv:

    You're amazing @ct_bolt !!! :kaocry::kaojoy:
  7. Pherocity_Studios said:
    Oh my holy moly goodness, THIS IS AMAZING! Thank you so much for this plugin, it works perfectly! I just did some testing with it and I couldn't find any issues with it! :kaoluv:

    You're amazing @ct_bolt !!! :kaocry::kaojoy:
    Yay! Great to hear!
    No prob. Glad I could help
    Happy Game Making! :LZSsmile: