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.

Questions about Scene_Map (CMS related)

Well, seeing as I've been actively participating in answering questions (to the best of my knowledge), now it is my turn to start asking questions ;)

Okay, right now I'm currently studying LegACy CMS and learning how to make my own CMS from scratch, but I need to know... all the windows I'm going to need to call, do I always have to call those and add them in Scene_Map, or can I make my own seperate Scene_Map in my CMS script or what? If thats the case, do I have to alias the Scene_Map methods or how do I go about it?

Or I guess I could sum this question up more like this...

In other words, how do I make my (whats going to be) CMS pop up instead of the default game Menu when I press the Menu button? And do I have to write all the @*_window stuff in Scene_Map?
 
You can just add all your windows to Scene_Map, or you can make your own Scene_Menu class. It's all how you want to do it.

I for one am against making your entire game menu within the Scene_Map, unless you have a simple menu. Even if you plan to use the map spriteset, I suggest using a custom Scene_Menu class.

But yes, if you plan to add your menu to the map, you will need to alias the update method and make a separate update method. If you need any help doing this, just ask.


@Arbiter: Scene_Menu < Window_Selectable ?
 
Cool, I have another quick question, figured I'd just use the same topic.

When I write something to a string like so...

self.contents.draw_text(128, 0, 96, 140, "$" + @credit_score.to_s, 2)

I have this problem where not only does the $ sign show like $9999999 but it also shows on the last 9 too.

How do I resolve this?
 
Code:
self.contents.draw_text(128, 0, 96, 140, "$" + @credit_score.to_s, 2)

That looks fine and dandy, but why 140? That should be at the most, 32 (unless you font is bigger). That is your text box height.

And remember, that 96 is the width. If your @credit_score has too many digits in it, some of them might be cut off by such a small area.


@Arbiter: lol. Don't worry about it. We all do it every now and then, especially me.
 
I got the height and width mixed up. Anyways, nothings cut off it all displays right...

The value still looks like

$9999999
...........$

With the $ in front, then another $ overlapping the last 9 X_x

For some reason I thought that 140's placement was the y offset, but for some reason all my values are displaying vertically just fine *shrugs*

EDIT: After going through my whole day and coming back, the error has mysteriously disappeared o.O
 

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