Is there an option or a script for it?
I have an event with a just a book-graphic that I switch (using the self-switch A) to another page. But my map is parallaxed so the event is underneath the parallax layer. The desk itself is above the player (parallax) and so the desk is also above the event... "Above characters" is still underneath the parallax (as it should).
I need some option to change the z-index of an event (preferably using a comment or script-call or something simple) inside the event.
Script Link:
https://github.com/suppayami/rmvxa-collection/blob/master/yami-script-ace/13%20-%20Overlay%20Mapping.txt
Change event z-index to be above the parallax?
● ARCHIVED · READ-ONLY
-
-
How are you using your parallaxed map? Normally they are under the player and even under A-Tiles.
-
we need to know which parallax scrtipt you're using, because by default all events are above the regular parallax layer.
Most probably your script adds an overlay-parallax, but in that case anyone trying to change your event's Z needs to know which Z the overlay was placed by the script... -
ah sorry. I use Yami's parallax overlay. Z-index for the parallax overlay: 297.
-
It also depends on the viewport. If the parallax script uses a viewport, and it has a higher z-index than the viewport for events (viewport 1), no matter what you make the z-index of the event (or the parallax), it will still display above it.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
Provide a LINK to the script please, so we can take a look at it :) -
I would suggest using the overlay script only for things that should be shown above the player and anything else (for example the top of a tree). For everything below the player/events try using yanflys parallax lock.ah sorry. I use Yami's parallax overlay. Z-index for the parallax overlay: 297.
-
Link:
https://github.com/suppayami/rmvxa-collection/blob/master/yami-script-ace/13%20-%20Overlay%20Mapping.txt
I'm aware of that. But that will still cause the same problem.I would suggest using the overlay script only for things that should be shown above the player and anything else (for example the top of a tree). For everything below the player/events try using yanflys parallax lock.
# Parallax Layer @par = Sprite.new(@viewport1) ... @par.z = 297Ugh.... So... basically I have a problem. It's the viewport z-index. So if I want to solve this I must write an addon-script and move the event sprite to a new viewport... I always find the Sprite_Map class so complicated :( .
And removing the viewports doesn't seem like a good option. I believe that Yami implemented that properly. -
Yanfly script should cause that problem since it is using the default z-index of parallax background. Do you have anything else that might interfere with it?Link:
https://github.com/suppayami/rmvxa-collection/blob/master/yami-script-ace/13%20-%20Overlay%20Mapping.txt
I'm aware of that. But that will still cause the same problem.
# Parallax Layer @par = Sprite.new(@viewport1) ... @par.z = 297Ugh.... So... basically I have a problem. It's the viewport z-index. So if I want to solve this I must write an addon-script and move the event sprite to a new viewport... I always find the Sprite_Map class so complicated :( .
And removing the viewports doesn't seem like a good option. I believe that Yami implemented that properly. -
Why are you doing it this way? Yami's OVERLAY script is meant to be used for OVERLAYS. If you want events to be ABOVE it, maybe you need to use a different script?
-
I know it's rare to have an event on top of an overlay. But in this case it just happened. So basically I need to find a way to put specific events on a different viewport with a higher z-index.
-
i once create a snippet for someone to increase the event z level
http://www.rpgmakervxace.net/topic/14467-request-script-for-change-the-selfz-of-specific-events/
for easier access i post the code again below
tag the event with <zmod> commentSpoiler=begin EST - EVENT ZMOD made to fulfil request for Daemonium in www.rpgmakervxace.net first set the new z you want in module estriole then give comment in the event page <zmod> the one checked is the active page. so if you have multiple page you can have some didn't have z mod. some have z mod. edit: apparently you will encounter glitch if you use zmod with event that have priority 'under character'. if you set the z too high then the actor will be covered by event graphic (like above character priority) so don't use zmod on event with 'under character' priority. before i planned make a patch to ignore zmod when 'under character' priority but i think it's not necessary.=endmodule ESTRIOLE EVENT_ZMOD = 1000endclass Spriteset_Map alias est_event_z_mod_create_characters create_characters def create_characters est_event_z_mod_create_characters recreate_event end def recreate_event i = 0 $game_map.events.values.each do |event| @character_sprites.viewport = @viewport1 if @character_sprites && !@character_sprites.disposed? && !event.note["<zmod>"] @character_sprites.viewport = @viewport9 if @character_sprites && !@character_sprites.disposed? && event.note["<zmod>"] i = i+1 end end alias est_event_z_mod_create_viewports create_viewports def create_viewports est_event_z_mod_create_viewports @viewport9 = Viewport.new @viewport9.z = ESTRIOLE::EVENT_ZMOD end end class Game_Event < Game_Character alias est_event_zmod_setup_page_settings setup_page_settings def setup_page_settings est_event_zmod_setup_page_settings return unless SceneManager.scene.is_a?(Scene_Map) return unless SceneManager.scene.spriteset SceneManager.scene.spriteset.recreate_event end #below taken from victor basic module to grab event note too lazy to write my own. def note return "" if !@page || !@page.list || @page.list.size <= 0 comment_list = [] @page.list.each do |item| next unless item && (item.code == 108 || item.code == 408) comment_list.push(item.parameters[0]) end comment_list.join("\r\n") endendclass Scene_Map < Scene_Base attr_reader :spritesetend
the concept basically create new viewport9 with set z level.
then reassign all event that have <zmod> comment to use that viewport instead viewport1 (default one).
i don't know does this could help you solve your issues. but at least it's a start :D . -
Exactly what I needed! Luckily I use Victors scripts anyway in that project so it was just plug and play.
Could you perhaps also add some terms of use to make it really complete? -
it's only a snippet actually...
but i do have default license :D . for all my scripts. :D .
Licenses
Free to use in all project (except the one containing pornography)
as long as i credited (ESTRIOLE).
so here we go :D .
Code:=begin EST - EVENT ZMOD made to fulfil request for Daemonium in www.rpgmakervxace.net first set the new z you want in module estriole then give comment in the event page <zmod> the one checked is the active page. so if you have multiple page you can have some didn't have z mod. some have z mod. edit: apparently you will encounter glitch if you use zmod with event that have priority 'under character'. if you set the z too high then the actor will be covered by event graphic (like above character priority) so don't use zmod on event with 'under character' priority. before i planned make a patch to ignore zmod when 'under character' priority but i think it's not necessary. Term of useFree to use in all project (except the one containing pornography)as long as i credited (ESTRIOLE). =endmodule ESTRIOLE EVENT_ZMOD = 1000endclass Spriteset_Map alias est_event_z_mod_create_characters create_characters def create_characters est_event_z_mod_create_characters recreate_event end def recreate_event i = 0 $game_map.events.values.each do |event| @character_sprites[i].viewport = @viewport1 if @character_sprites[i] && !@character_sprites[i].disposed? && !event.note["<zmod>"] @character_sprites[i].viewport = @viewport9 if @character_sprites[i] && !@character_sprites[i].disposed? && event.note["<zmod>"] i = i+1 end end alias est_event_z_mod_create_viewports create_viewports def create_viewports est_event_z_mod_create_viewports @viewport9 = Viewport.new @viewport9.z = ESTRIOLE::EVENT_ZMOD end end class Game_Event < Game_Character alias est_event_zmod_setup_page_settings setup_page_settings def setup_page_settings est_event_zmod_setup_page_settings return unless SceneManager.scene.is_a?(Scene_Map) return unless SceneManager.scene.spriteset SceneManager.scene.spriteset.recreate_event end #below taken from victor basic module to grab event note too lazy to write my own. def note return "" if !@page || !@page.list || @page.list.size <= 0 comment_list = [] @page.list.each do |item| next unless item && (item.code == 108 || item.code == 408) comment_list.push(item.parameters[0]) end comment_list.join("\r\n") endendclass Scene_Map < Scene_Base attr_reader :spritesetend -
I've been using ESTRIOLE's snipet to define some characters above overlays, but the "window tint" will not affect the events with the zmod comment added on them. I would like to know if it is possible to still keep them above overlays and yet be affected by the window tint (I use galv layer pictures for parallax mapping.) Thanks and sorry for necroposting =/
-
[necro]@alaky [/necro]
Please, be extra careful, checking the date of the last post in a thread (making sure it isn't a necropost) and if it is not early enough don't reply.
[mod]Closing.[/mod]