- Joined
- Feb 2, 2015
- Messages
- 6
- Reaction score
- 0
- First Language
- English
- Primarily Uses
Edit: I'm using VX ace.
I apologize if this question has been brought up before (I searched for it and was unable to find it) or if I've placed it in the wrong section but I was hoping someone could help me create my first selectable window in rgss.
I'm completely new to scripting but after following various tutorials I think I've got some of the basics of creating a selectable window down, but I can't seem to activate it. The window creates perfectly fine, but the cursor doesn't flash and I can't move it up or down. I was under the impression that I'm supposed to simply activate the window with a "@mywindow.active = true" line but I guess I"m missing something.
Here's what I have so far.
############################################################
## The Selectable Lore Window
Class Window_Lore < Window_Selectable
def initialize
super(0, 64, 544, 416-64)
refresh
end
def refresh
create_contents
for i in 0...$game_party.lore.size
lore = $game_party.lore
lorestuff = Textlist_Info::Loreinfo[lore]
lorewriting = lorestuff[0]
rect = item_rect(i)
self.contents.draw_text(rect, lorewriting)
end
end
end
##The Scene that calls the window
class Scene_Lore < Scene_Base
def start
create_contents
end
def create_contents
@loretitle = Window_LoreTitle.new
@lorewindow = Window_Lore.new
@lorewindow.active = true
@lorewindow.index = 0
end
def update
@loretitle.update
@lorewindow.update
if @lorewindow.active == true
update_list
return
end
end
def update_list
if Input.trigger?(Input::C)
# @lorewindow.active = false
lore = $game_party.lore[@lorewindow.index]
loreinfo = Textlist_Info::Loreinfo[lore]
Sound.play_decision
@lorepic = Sprite.new
@lorepic.bitmap = Cache.picture(loreinfo[2])
end
if Input.trigger?(Input::
SceneManager.call(Scene_Save)
end
end
def terminate
@lorewindow.dispose
end
end
I apologize if this question has been brought up before (I searched for it and was unable to find it) or if I've placed it in the wrong section but I was hoping someone could help me create my first selectable window in rgss.
I'm completely new to scripting but after following various tutorials I think I've got some of the basics of creating a selectable window down, but I can't seem to activate it. The window creates perfectly fine, but the cursor doesn't flash and I can't move it up or down. I was under the impression that I'm supposed to simply activate the window with a "@mywindow.active = true" line but I guess I"m missing something.
Here's what I have so far.
############################################################
## The Selectable Lore Window
Class Window_Lore < Window_Selectable
def initialize
super(0, 64, 544, 416-64)
refresh
end
def refresh
create_contents
for i in 0...$game_party.lore.size
lore = $game_party.lore
lorestuff = Textlist_Info::Loreinfo[lore]
lorewriting = lorestuff[0]
rect = item_rect(i)
self.contents.draw_text(rect, lorewriting)
end
end
end
##The Scene that calls the window
class Scene_Lore < Scene_Base
def start
create_contents
end
def create_contents
@loretitle = Window_LoreTitle.new
@lorewindow = Window_Lore.new
@lorewindow.active = true
@lorewindow.index = 0
end
def update
@loretitle.update
@lorewindow.update
if @lorewindow.active == true
update_list
return
end
end
def update_list
if Input.trigger?(Input::C)
# @lorewindow.active = false
lore = $game_party.lore[@lorewindow.index]
loreinfo = Textlist_Info::Loreinfo[lore]
Sound.play_decision
@lorepic = Sprite.new
@lorepic.bitmap = Cache.picture(loreinfo[2])
end
if Input.trigger?(Input::
SceneManager.call(Scene_Save)
end
end
def terminate
@lorewindow.dispose
end
end
Last edited by a moderator:

