Hi,
I've got a quest screen that appears when the user presses 'q'
but at the start it obviously says 'no quests at present'
but when you get quests, how do i add the quest to the window ?
because the quest window bit is under a script called 'quest'
how would i make it add a quest from an event (ie, an npc) somewhere else in game ?
also if you keep adding quests, how would i get the quests to automatically appear under each of the other quests ?
any help would be greatly appreciated.
Thanks.
here is the code from my quest window (it is a modified version of chopsuey's window)
I've got a quest screen that appears when the user presses 'q'
but at the start it obviously says 'no quests at present'
but when you get quests, how do i add the quest to the window ?
because the quest window bit is under a script called 'quest'
how would i make it add a quest from an event (ie, an npc) somewhere else in game ?
also if you keep adding quests, how would i get the quests to automatically appear under each of the other quests ?
any help would be greatly appreciated.
Thanks.
here is the code from my quest window (it is a modified version of chopsuey's window)
Code:
#-------------------------------
#----Quests Window V.1----------
#-------------------------------
class Scene_Quests
#----def main-------------------
def main
@quests_status = Window_QuestsStatus.new
@quests_window = Window_Quests.new
@quests_status.opacity = 100
@quests_window.opacity = 100
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@quests_status.dispose
@quests_window.dispose
end
#----def update-----------------
def update
@quests_window.update
@quests_status.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
end
end
#-------------------------------
#---------Window_Quests---------
#-------------------------------
class Window_Quests < Window_Selectable
#----def initialize-------------
def initialize
super(0, 60, 640, 420)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
refresh
end
#----def refresh----------------
def refresh
self.contents.font.color = normal_color
self.contents.draw_text(505, 420, 120, 32, "Press Esc To Exit")
# Quests listed here....
self.contents.draw_text(5, 2, 320, 32, "None at present")
end
end
#-------------------------------
#----Window_QuestsStatus--------
#-------------------------------
class Window_QuestsStatus < Window_Base
def initialize
super(0, 0, 640, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
refresh
end
def refresh
self.contents.draw_text(10, 0, 320, 32, "Current Quests")
end
end