Add Variables on Main Menu (LUNA)

Discussion in 'VXAce Luna Engine Support' started by Halfmoon Media, Jun 6, 2016.

  1. Halfmoon Media

    Halfmoon Media Illustrator, Eventer, Writer Veteran

    Messages:
    61
    Likes Received:
    9
    Location:
    A World Without End
    First Language:
    English
    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
     
    #1
  2. Halfmoon Media

    Halfmoon Media Illustrator, Eventer, Writer Veteran

    Messages:
    61
    Likes Received:
    9
    Location:
    A World Without End
    First Language:
    English
    Bump
     
    #2
  3. Halfmoon Media

    Halfmoon Media Illustrator, Eventer, Writer Veteran

    Messages:
    61
    Likes Received:
    9
    Location:
    A World Without End
    First Language:
    English
    bump??
     
    #3
  4. Archeia

    Archeia Level 99 Demi-fiend Staff Member Developer

    Messages:
    14,480
    Likes Received:
    14,084
    Location:
    Game Dev Salt Mines
    First Language:
    Filipino
    Primarily Uses:
    VNM
    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: Jun 16, 2016
    #4

Share This Page