Hey guys, Anyone know if there is any way, or any script that will let me place events above pictures? I did try and google it, but I got nothing. Thanks!
Show an event.sprite above a picture?
RPG Maker VXAce SupportYou'd need to find the specific sprite and set it's .z value to a higher one
I added an accessor to Game_Event and Game Picture, and I set the picture's z value to a lower one than the event, but the event does not appear above the picture. Any other ideas?
Code:
class Game_Event < Game_Character attr_accessor :z # zendclass Game_Picture attr_accessor :z # zendclass Game_Interpreter # function is called by event def put_event_above(@event_id) $game_map.events[@event_id].z = 9999 endend
I think it's because sprites do get refreshed with the map update so everytime that happens, the z value also returns to the default one which is based on priority set on the event page itself... so you will need to tap into the actual redrawing part of the sprites and modify it in there
Thanks for the help, changing the event's priority in its update or refresh functions changes it's z axis value, but setting the picture's z value in it's update function doesn't put it behind the events. I'll just put the picture as part of the parallax.
Nope. Pictures go into viewport2 and events into viewport1. No matter what you made the z values, unless you change the viewports as well (via scripting), pictures will always be above events.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/show-an-event-sprite-above-a-picture.25168/