Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Picture Z position

This problem is still unsolved. Any scriptor can easily help. What do I do?
I am trying to show a picture via RGSS, and then set it's Z coordinate behind the tile set, thats it. Nothing special.

This is what I have so far...
@image = Sprite.new
@image.bitmap=RPG::Cache.picture("sky.png")
@image.z = -100
But when I run it I get this problem:
stupid rmxp...":dz0pypf6 said:
Unable to find file(eval):1: in 'intialize'Graphics/Pictures/sky.png
But Sky.png is in the pcitures file.

Can some one help?
I'm so confused -_-
 
AceJP;267907 said:
so if using that code, and wanting it to affect picture 10. What would it look like?
I tried messing around with it and can't figure it out :\
I think it is this, but I can be wrong.
Code:
$game_screen.pictures[picture_id].z
picture_id will be 10 in your case
 
first of all, you don't need to put the file extension. And you need to pay attention to the filename, because the programm is case sensitive.
Meaning that if the file's name 'Sky.png' you'll put 'Sky' and not 'sky'.

now, your code seems to be correct...

Code:
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.picture("sky") # or "Sky" ?
@sprite.z = -100

It should work.
 
so far so good.
The pic will load now. But it only appears above the tileset. If I set it to a negative z it dissappears behind the panorama. I tried setting the panorama to -10000 in the script, then setting the picture z to just -1, but it still dissappears behind the tileset.
When I take out the panorama, th e pic displays behind the tile set though
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top