Halfmoon Media

Illustrator, Eventer, Writer
Veteran
Joined
Aug 17, 2014
Messages
61
Reaction score
9
First Language
English
Primarily Uses
I'm trying to display 3 variables (18, 19, and 20) on the Main Menu, but I can't figure out how to do it. I want the variables to display strings (ex, $game_variables[18] = "Chapter 1"), they don't need icons or anything. I am trying to get them to display in that box on the right (attached picture), but I can't get them to show up at all.


Help?


((ignore the poor drawings - they were just place-holder images while I edited the menu layout))


Code I was using:

class Window_Gold < Window_Base
  def initialize
    super(0, 0, window_width, fitting_height(3))
    refresh
  end
  
  def refresh
    contents.clear
    draw_chapter(4,0,contents.width - 8)
    draw_objective(8,0,contents.width - 8)
    draw_location(12,0,contents.width - 8)
  end
  
  def draw_chapter(x,y,width)
    change_color(system_color)
    draw_text(x,y,width,line_height,"Chapter")
    change_color(normal_color)
    draw_text(x, y, width - 2, line_height, $game_variables[18], 2)
  end
  
  def draw_objective(x,y,width)
    change_color(system_color)
    draw_text(x,y,width,line_height,"Objective")
    change_color(normal_color)
    draw_text(x, y, width - 2, line_height, $game_variables[19], 2)
  end
  
  def draw_location(x,y,width)
    change_color(system_color)
    draw_text(x,y,width,line_height,"Location")
    change_color(normal_color)
    draw_text(x, y, width - 2, line_height, $game_variables[20], 2)
  end
end


Capture.PNG
 

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,217
Reaction score
15,637
First Language
Filipino
Primarily Uses
RMMZ
Have you tried using Lunatic Mode?


We have example snippets there that should allow you to display variables without having to do what you were doing.
 
Last edited by a moderator:

Latest Threads

Latest Profile Posts

Remember guys: Drink water and workout is important too! Don't stay too much time on the PC working! :D
Ami
--- Quest For Female ---

Guild Leader: Ladies,you got a Job for today. You have to Battle with Marauder,only Female must to this Job.
F.Magic Knight: So,only Female can do this?
Heroine: I can't wait for this!
Gunner Lady: Well,i can use the Seduction Skill to them,It's effective for Male Target
F.Knight: You always use that?
RPG Maker MZ just crashed, please tell me I didn't just lose 4 hours of progress.
>be me with a separate game for testing
>NPC doesn't stay in new position after leaving the map
>looking for tutorials, nothing useful
>checks plugin of save even location and installs it
>testing the game

"Oh... IT'S WORKING, IT'S ACTUALLY WORKING!!"
My current peak of boss design.

Forum statistics

Threads
109,034
Messages
1,041,439
Members
141,516
Latest member
00cassiesmells
Top