What layer is text drawn on?

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
I'd like to put a picture over text, but I do not know what layer text is drawn on.

Here is an example of what I'd like to do in the editor:



I'd like the hand and ripping picture to be over the text itself.  I just need to know what layer to set it on.

I can only get to 100 on "Show picture" and the image still goes behind the text:



Thank you in advance for your help.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
'@viewport1' (Tilemap) is at a z-coordinate of 0, '@viewport2' (Weather, Timer, Pictures) is at a z-coordinate of 50 and '@viewport3' (Flash) is at a z-coordinate of 100. The message window is not on any of the primary viewports, and is set at a z-coordinate of 200. So, even at maximum height, a picture on '@viewport2' will always remain underneath the message window. At least, that is how it is by default.


You could create a Sprite that has that picture, then bump it up to a z-coordinate of 200+, and that would allow the graphic to be over the message window.
 
Last edited by a moderator:

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
'@viewport1' (Tilemap) is at a z-coordinate of 0, '@viewport2' (Weather, Timer, Pictures) is at a z-coordinate of 50 and '@viewport3' (Flash) is at a z-coordinate of 100. The message window is not on any of the primary viewports, and is set at a z-coordinate of 200. So, even at maximum height, a picture on '@viewport2' will always remain underneath the message window. At least, that is how it is by default.
Okay, so I need to set the picture manually in a script call to show on z-coodrinate 201.  Thank you.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
You could create a Sprite which uses the graphic, and set it to 200+ as well. Then just dispose of it after you're finished. Probably an easier process than creating a script to lug a picture onto another viewport or z-coordinate.
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
You could create a Sprite which uses the graphic, and set it to 200+ as well. Then just dispose of it after you're finished. Probably an easier process than creating a script to lug a picture onto another viewport or z-coordinate.
If you have a moment can you show me an example?  I appreciate your help in the matter, thank you.  I'll give a shot that way too.

Edit:  I attempted to follow suit here: http://forums.rpgmakerweb.com/index.php?/topic/14639-setting-the-z-coordinate-of-pictures/

Only to find out that it cannot promote things above the text at z:200+ as I thought would solve it.  Attempting to make it a sprite as you suggested.
 
Last edited by a moderator:

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
class Instant_Sprite def self.create(filename, name, x, y, z, viewport = nil) @sprite_cluster ||= Hash.new @sprite_cluster[name] = Sprite.new(viewport) @sprite_cluster[name].bitmap = Cache.picture(filename) @sprite_cluster[name].x = x @sprite_cluster[name].y = y @sprite_cluster[name].z = z end def self.erase(name) @sprite_cluster[name].bitmap.dispose @sprite_cluster[name].dispose @sprite_cluster.delete(name) end endThis is a really, really rough but workable scriptlet. There is no updating, so unlike pictures there is no movement or fancy whatnots like that. But ... it does work for non-moving, static images.Callable as follows :

Code:
Instant_Sprite.create('BlueSky', 'test', 0, 0, 210)Instant_Sprite.erase('test')
 
Last edited by a moderator:

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Absolutely perfect.  I'll need to adjust my coordinates to top left instead of center, but I can live with that easily.

Thank you for your effort in the matter and please do let me know if I can return the favor somehow. 
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
Updated the scriplet because I made a bad under the 'erase' method.
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Confirmed the error and the fix works.  Again much appreciated and thank you.  =3  
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
After thinking a little further on the subject, I think this might be a better solution in the long run :

#==============================================================================# ** Spriteset_Map#==============================================================================class Spriteset_Map #-------------------------------------------------------------------------- # * ALIAS - Update Picture Sprite #-------------------------------------------------------------------------- unless method_defined?:)picture_YrdUQOTK_ssm_update_pictures) alias_method:)picture_YrdUQOTK_ssm_update_pictures, :update_pictures) end def update_pictures(*args, &block) $game_map.screen.pictures.each do |pic| if pic.number > 100 @picture_sprites[pic.number] ||= Sprite_Picture.new(nil, pic) @picture_sprites[pic.number].z = pic.number end end picture_YrdUQOTK_ssm_update_pictures(*args, &block) endend # Spriteset_MapWith the above scriptlet, any picture over the number of 100 will be released from '@viewport2' and have a z-coordinate equal to its number (picture number 150 would have a z-coordinate of 150, and so on). You will have to use the '$game_map.screen.pictures[number].show' script command to display a picture, but now you can have motion, centered x/y coordinates, and so on.

Code:
# origin - 0 upper-left, 1 center# zoom_x - 100.0 default# zoom_y - 100.0 default# opacity - 255 default# blend_type - 0 default, 1 add, 2 subtractscreen.pictures[number].show('filename', origin, x, y, zoom_x, zoom_y, opacity, blend_type)
EDIT: Edited code because of double picture update.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top