Layering showPicture,animations,and player sprites

I would like to create a scene with with a picture above an event which is playing an animation which so far works.. but the player seems to be in the same layer as the event. Id like to have the player be above the picture but the animation event below both.. so

bottom:
--event playing animation.

--showPicture displaying a wall

--player sprite on the other side of the wall
top:


my first thought is to hide the player and put a picture of the player with showPicture with which i could assign a z value.. and then reassign pictures for a walking animation or whatever animations i needed.. but this seems redundant and a lot of work to reanimate something that was already animated

the other problem with this is I may need to place animations above the showPicture later rather than below it so I'd like a solution to both before hand.


would it be possible to run a script call to assign a z value? if so how would i do so? this.z = +1?

sorry If this isn't posted in the right place this forums organization has always confused me.
Close, this is where you post scripts you made and wish to release.

I've moved this thread to Learning Ruby. Thank you.

thanks for moving the thread to the right place, though it seems nobody is capable of answering the question.
Not so much incapable, but moreso there really isn't a clear-cut solution scripting-wise. Using the default way things are drawn, you're asking for something that's impossible. The event and player graphics are drawn on a different viewport than the pictures are (@viewport1 and @viewport2 respectively, as seen in Spriteset_Map). @viewport1 has a lower z-value than @viewport2, so all sprites on @viewport1 will ALWAYS be under @viewport2.

On that note, animations (by default) are placed at a z-value 300 higher than the character sprite as seen in Sprite_Base:
Code:
sprite.z = self.z + 300 + i
These too are bound to @viewport1
Code:
  def make_animation_sprites
    @ani_sprites = []
    if @use_sprite && !@@ani_spr_checker.include?(@animation)
      16.times do
        sprite = ::Sprite.new(viewport) #<==== this here

You'll need some script that completely rewrites the way Spriteset_Map (and animations in Sprite_Base) draws everything. I'm not versed in the VXA culture, so I can't point you to anything.
thanks for the insight KK20, I don't believe my end goal is impossible but maybe how I'm describing it makes it seem more difficult.

which viewport are animations shown in? is it possible to assign a z value to an animation?
If you set the event to "Below Characters" priority, this should put the event itself below the player's layer.

You could indeed modify the .z of the default sprite objects, but Im not sure right now if doing it directly will work correctly for them due to the different viewports. Anyway, you can try to set their .z value to a high value and see if they show above everything else. To do it you'd need to do

spriteobject.z = value

So you need first to know the "name" of the sprite object that you want to modify.

I actually have a script that allows you to transfer events and player into a higher Z so that they wont even be affected by screen tints, so its definitely doable but I cant check it right now or anytime soon.

PS: which RM are you using? This thread is on RGSSx but your commands (showPicture, this.z) are reminiscent of MV's JavaScript.
If you set the event to "Below Characters" priority, this should put the event itself below the player's layer.

You could indeed modify the .z of the default sprite objects, but Im not sure right now if doing it directly will work correctly for them due to the different viewports. Anyway, you can try to set their .z value to a high value and see if they show above everything else. To do it you'd need to do

spriteobject.z = value

So you need first to know the "name" of the sprite object that you want to modify.

I actually have a script that allows you to transfer events and player into a higher Z so that they wont even be affected by screen tints, so its definitely doable but I cant check it right now or anytime soon.

PS: which RM are you using? This thread is on RGSSx but your commands (showPicture, this.z) are reminiscent of MV's JavaScript.

Ace, but i started by researching myself i might of unknowingly read some javascript without realizing.

Original thread: https://forums.rpgmakerweb.com/threads/layering-showpicture-animations-and-player-sprites.114625/