Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Simple Current Objective
- # 06/13/2011
- #------------------------------------------------------------------------------
- # By Nathanial / Beleren
- #==============================================================================
- # + Installation
- # Place this below Materials.
- #
- # + Menu Addition
- # If you're using the default RMVX menu, please read my topic, as I have
- # instructions on how to add a menu option to display the current objective
- # screen. If you're not, please consult whoever wrote your menu script, as
- # I cannot be bothered to help every person get this in their custom menu.
- #==============================================================================
- #==============================================================================#
- # ** Current_Objective
- #==============================================================================#
- module Current_Objective
- module_function
- def option ; return "Objective" ; end
- Objective_Container = 1 # // This is the variable ID that holds current objective.
- Background_Variable = 2 # // Used for managing the menubackground
- def current
- case $game_variables[Objective_Container]
- when 0 ; return " Head to the ruins Northheast of Vance."
- when 1 ; return "Talk to the Elder to intrude the haven."
- when 2 ; return "Eat some cake."
- when 3 ; return "And... another"
- else ; return "No Objective"
- end
- end
- def get_background()
- case $game_variables[Background_Variable]
- when 0 ; return Cache.picture( "beg-scene-01" )
- when 1 ; return Cache.picture( "insert picture filename here" )
- when 2 ; return Cache.picture( "insert picture filename here" )
- when 3 ;
- else ; return Cache.picture( "" ) # // Return Blank Image
- end
- end
- end
- ###################################################################
- # DO NOT EDIT UNLESS YOU KNOW WHAT TO DO #
- ###################################################################
- #==============================================================================#
- # ** Objective_Window
- #==============================================================================#
- class Objective_Window < Window_Base
- def initialize()
- super(0, 0, Graphics.width, 150)#0,116,544,300
- create_contents()
- refresh()
- end
- def objective_window_contents ; return Current_Objective::current ; end
- def refresh()
- stb = -26
- txw = -170
- self.contents.clear()
- line = objective_window_contents
- self.contents.draw_text(0, txw += 20, 544, 416, line)
- end
- end
- #==============================================================================#
- # ** Quest_Picture # Unused
- #==============================================================================#
- class Quest_Picture < Sprite
- def initialize()
- super()
- self.bitmap = Cache.picture(Current_Objective::picture)
- end
- end
- #==============================================================================#
- # ** Objective_Screen
- #==============================================================================#
- class Objective_Screen < Scene_Base
- def start()
- super()
- create_menu_background()
- @objective_window = Objective_Window.new
- @menuback_sprite.color.set( 0, 0, 0, 255 )
- @menuback_sprite.bitmap = Current_Objective.get_background()
- #@qpic = Quest_Picture.new
- end
- def terminate()
- super()
- dispose_menu_background()
- @objective_window.dispose() unless @objective_window.nil?()
- #@qpic.dispose
- end
- def update()
- super()
- update_menu_background()
- @objective_window.update()
- update_objective_screen()
- end
- def update_objective_screen
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Menu.new(5)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment