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.

How do you make a transparent menu?

You simply need to use the opacity property of the window. Simply add the following line in the initialize method of the window
Code:
self.opacity = x
where x is the opacity value, from 0 to 255.

Take care!
-Dargor
 

omaasi

Member

Thanks Dargor but it didn't work. Well, the menu got transparent but I can't see the map through it, just a black background. (Still, I'm not even sure if I put the script in the right place.) Sorry...
 
For the background, you need to go into your scene (like Scene_Menu, Scene_Item, etc.) and in initialize add @spriteset = Spriteset_Map.new
Make sure to place this above every @window_xxxx.


Then, in dispose, add
@spriteset.dispose

Hope it helps!
 
Dargor":1cd4x61t said:
For the background, you need to go into your scene (like Scene_Menu, Scene_Item, etc.) and in initialize add @spriteset = Spriteset_Map.new
Make sure to place this above every @window_xxxx.


Then, in dispose, add
@spriteset.dispose

Hope it helps!

You forgot one thing. You have to add @spriteset.update in the update method. Otherwise, rain won't fall, animations won't play, and everything will just...stop.
 
Okay you semm to be talking about this so I'm going to ask:
I can't get @spriteset to work for Scene_Status
It doesn't show up and I get a stack error for @spriteset.update
If I put it in Window_Status however, it shows up but I can't get @spriteset.dispose to work
 
omaasi":pg51bfx6 said:
(And besides I'm a girl but since I got my help it doesn't really matter)

:x sorry!

@Velocir_X
The spriteset initialization should always happen in a scene and before the windows initialization.
Doing so will make the spriteset appear behind the windows.

So, you're doing this and it doesn't work, only for Scene_Status? That's odd.
Do you have any other scripts that alters this scene?

You can try to use this script snippet, it adds the spriteset to the Status Scene:
Code:
 

class Scene_Status

  alias dargor_xp_scene_spriteset_initialize initialize

  alias dargor_xp_scene_spriteset_update update

  alias dargor_xp_scene_spriteset_dispose dispose

  def main

    @spriteset = Spriteset_Map.new

    dargor_xp_scene_spriteset_initialize

  end

  def update

    @spriteset.update

    dargor_xp_scene_spriteset_update

  end

  def dispose

    @spriteset.dispose

    dargor_xp_scene_spriteset_dispose

  end

end

 

If you want to make this work for any scenes you want, simply change

class Scene_Status

for

class YOUR_SCENE_NAME

Take care!
-Dargor
 
Okay I don't have any changes to Scene_Status
Or Window_Status
(except for opacity but that doesn't really count)
However it is called in from a CMS
Oh and when I tried that snippet I get an syntax error from:
alias dargor_xp_scene_spriteset_update
 
Give me more details about the error. Which line, etc.
And I really don't recommend using it in a window, because it shouldn't belong to a window. I'm probably way too cautious about this for nothing, but as a general rule, spriteset belongs to a scene.

And when you want to dispose something, if it's in anything else than a scene, place @my_variable.dispose in the dispose method.
 

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