Project1
标题:
人物加点如何在菜单中显示?
[打印本页]
作者:
Cherry
时间:
2011-6-30 22:30
标题:
人物加点如何在菜单中显示?
http://rpg.blue/thread-83054-1-1.html
人物加点如何在菜单中显示? dsu_plus_rewardpost_czw
作者:
我的米呀
时间:
2011-6-30 23:59
本帖最后由 我的米呀 于 2011-7-1 09:37 编辑
学习了下知道怎么改了!!
把这个覆盖掉Scene_Menue
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
# 处理菜单画面的类。
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# menu_index : 命令窗口光标初始位置
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# ● 开始处理
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(160, 0)
end
#--------------------------------------------------------------------------
# ● 结束处理
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# ● 更新画面
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# ● 生成命令窗口
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = "手动加点"
s6 = Vocab::save
s7 = Vocab::game_end
s8 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,s7])
@command_window.index = @menu_index
if $game_party.members.size == 0 # 如果队伍为空
@command_window.draw_item(0, false) # 无效化物品选项
@command_window.draw_item(1, false) # 无效化技能选项
@command_window.draw_item(2, false) # 无效化装备选项
@command_window.draw_item(3, false) # 无效化状态选项
end
if $game_system.save_disabled # 如果禁止存档
@command_window.draw_item(4, false) # 无效化存档选项
end
end
#--------------------------------------------------------------------------
# ● 更新命令窗口
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # 物品
$scene = Scene_Item.new
when 1,2,3 # 技能、装备、状态
start_actor_selection
when 4
$scene = Scene_Lvup.new
when 5 # 存档
$scene = Scene_File.new(true, false, false)
when 6 # 结束游戏
$scene = Scene_End.new
end
end
end
#--------------------------------------------------------------------------
# ● 角色选择开始
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# ● 角色选择结束
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
#--------------------------------------------------------------------------
# ● 角色选择更新
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1 # 技能
$scene = Scene_Skill.new(@status_window.index)
when 2 # 装备
$scene = Scene_Equip.new(@status_window.index)
when 3 # 状态
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
复制代码
作者:
Cherry
时间:
2011-7-6 10:26
我又懂了:
VOCAB_MENU_ENEMY_GUIDE = "怪物图鉴"
OPTION_NAME = "系统音量"
VOCAB_MENU_PARTYFORM = "队伍编成"
OPTION_name = "人物加点"
#==============================================================================
# ■ Scene_Menu
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# ● 生成指令窗口
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = OPTION_name
s6 = VOCAB_MENU_ENEMY_GUIDE
s7 = VOCAB_MENU_PARTYFORM
s8 = Vocab::save
s9 = OPTION_NAME
s10 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10])
@command_window.index = @menu_index
if $game_party.members.size == 0 # 同伴人数为 0 的情况下
@command_window.draw_item(0, false) # 物品无效化
@command_window.draw_item(1, false) # 特技无效化
@command_window.draw_item(2, false) # 装备无效化
@command_window.draw_item(3, false) # 状态无效化
end
if $game_system.save_disabled # 禁止存档的情况下
@command_window.draw_item(4, false) # 存档无效化
end
end
#--------------------------------------------------------------------------
# ● 更新指令选择
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0
$scene = Scene_Item.new
when 1
$scene = Scene_Skill.new
when 2
$scene = Scene_Equip.new
when 3
$scene = Scene_Status.new
when 4
$scene = Scene_Lvup.new
when 5
$scene = Scene_EnemyGuide.new
when 6
$scene = Scene_PartyForm.new
when 7
$scene = Scene_File.new(true, false, false)
when 8
$scene = Scene_System.new
when 9
$scene = Scene_End.new
end
end
end
end
复制代码
作者:
小凡哥
时间:
2011-8-6 17:35
我又懂了:
下面这个脚本是干吗的?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1