Green

Villager
Member
Joined
Jun 28, 2015
Messages
6
Reaction score
0
First Language
English
Primarily Uses
I have a HUD in my game that I am working on and I am an amateur at javascript (I really don't know what I'm doing). I have made a decent and functional HUD.


The way that I made my HUD is such that there is a window on which I draw the contents of my HUD and then I hide the window skin, leaving the elements I desire. Obviously, this is built on Window_Base and Scene_Map (from Soul's tutorial).


The problem with this is that I am unable to see any message windows that open, my HUD has priority to these windows in rendering. How can I make sure that my HUD is on the bottom layer of the Scene_Map?


Thanks.


EDIT: Just to clarify, the HUD is sized to take up the entire display.
 
Last edited by a moderator:

Green

Villager
Member
Joined
Jun 28, 2015
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Bump


I noticed that the menu can overlap the HUD and I believe, based on the code, that this is on a different scene. I drew my HUD onto the Scene_Map directly and I think that message windows do the same thing, which is why the message window is invisible. So, my hypothesis is that I need to separate the HUD into its own Scene and have this render on the bottom. Unfortunately, I don't completely understand the code when I look at it and I don't know what I'm supposed to do to change this.


Could someone point me to where in the code the Scenes are actually executed? I took a look at SceneManager, but I couldn't really distinguish where this was.
 

Green

Villager
Member
Joined
Jun 28, 2015
Messages
6
Reaction score
0
First Language
English
Primarily Uses
UPDATE: So, by more clearly defining the shape of the UI and creating multiple windows with small boundaries, I have managed to fit the message box in by resizing it, but it still would be much easier if I could somehow have given priority of display to one of the windows on Scene_Map.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
You could probably just change the Z value of the Window/Sprite to a higher value.


Scenes are handled by the Scene_XXX objects but most of their contents esp the windows have their own code contained in the Window_XXX objects
 

Green

Villager
Member
Joined
Jun 28, 2015
Messages
6
Reaction score
0
First Language
English
Primarily Uses
You could probably just change the Z value of the Window/Sprite to a higher value.

I took a look around for z values and I couldn't find anything pertaining to MV, but I did for VX Ace.


However, your reference to these z values led me to this, which has solved the issue! :D :




If anyone is having the same issue, essentially what solved the problem is instead of using addWindow() in the Scene_xxx.prototype.start function, I used addChild(), the effects of which you can read about in ^. This moved my HUD to the lowest layer of Scene_Map. 
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
Oh I never realized they removed the Z value in MV. :)
 

Latest Threads

Latest Posts

Latest Profile Posts

Well I am infinitely upset that I finally got a good idea... after the Touch the Stars game jam is pretty much over.

Gather resources to build a spaceship to escape the apocalypse! It would have been cool....
Thinking that if I get MZ, I'll work on a new Project. How about instead of just an RPG, I make it episodic, like an anime? You might even get fanservice. Oh, but I need the right costume for the character.
"but what even is an API??"
Poppet Quest stats so far.. 61 views, 20 downloads, 3 reviews, 1 comment, 4 followers gained.... Hmm...
From a content creation standpoint, games really have awful traction. At least the experiment is interesting, time to see what adding Twitter into the mix does. Maybe the supposed 1,290 followers I have on it will prove useful. Then I'll test out Insta. :barf:

Forum statistics

Threads
113,603
Messages
1,076,140
Members
147,603
Latest member
Duckstuff2008
Top