Hi, I need a quick scene for my game for equipment.
All it is, is a selectable window, which shows a certain type of equipment in it.
It needs to be able to be called by:
$scene = Scene_Armoury.new('type')
When called it will show that type of armour. When the selection is made, it equips that armour in the appropriate slot, and then closes the scene (goes back to Scene_Map).
At the top of each list is "none". When this is chosen, it gets rid of whatever is equipped in that particular slot.
I have the sort of basic scene made, I just need the selectable window made. I've started it off, but I haven't got a clue how the equip works and everything.
Important info: This is for a commercial online game.
Thanks!
Please let me know if anything is missing from here.
All it is, is a selectable window, which shows a certain type of equipment in it.
It needs to be able to be called by:
$scene = Scene_Armoury.new('type')
When called it will show that type of armour. When the selection is made, it equips that armour in the appropriate slot, and then closes the scene (goes back to Scene_Map).
At the top of each list is "none". When this is chosen, it gets rid of whatever is equipped in that particular slot.
I have the sort of basic scene made, I just need the selectable window made. I've started it off, but I haven't got a clue how the equip works and everything.
Code:
class Scene_Armoury(type)
def initialize
@type = type
end
def main
# Command window
s1 = '(None)'
@data = [s1]
@command = Window_Command.new(232, @data)
@command.y = 51-16
@command.z = 9999
@command.x = 232
@command.height = 250
# Sprites and bitmaps
@spriteset = Spriteset_Map.new
@hud = Window_HUD.new
@hud_img = Sprite.new
@hud_img.bitmap = RPG::Cache.picture('hud')
# Loop
Graphics.transition
loop do
Graphics.update
Input.update
update
break if $scene != self
end
Graphics.freeze
# Dispose of shiz
@command.dispose
@spriteset.dispose
@hud.dispose
@hud_img.dispose
end
def update
# stuff here for selectable window maybe?
#----------------------------------------
#----------------------------------------
@command.update
@spriteset.update
#
# My game uses a mouse system (see comments)
#
if Mouse.click?(Mouse::Right_Click) # Just imagine this is B
$scene = Scene_Map.new
end
if Mouse.click?(Mouse::Left_Click) # Just imagine this as button C
case @command.index
when 0
#
when 1
#
end
end
end
end
Important info: This is for a commercial online game.
Thanks!
Please let me know if anything is missing from here.