Project1
标题:
请问怎样让战斗状态栏里面只能显示1号主角的属性?
[打印本页]
作者:
aaalbx
时间:
2012-7-27 00:04
标题:
请问怎样让战斗状态栏里面只能显示1号主角的属性?
本帖最后由 aaalbx 于 2012-7-27 09:44 编辑
问题都写在标题上了。。。敝人水平实在底下,想半天都没能写好,无奈上站上求助了。好了,发完贴睡觉。。。。。。 dsu_plus_rewardpost_czw
作者:
灯笼菜刀王
时间:
2012-7-27 02:22
本帖最后由 灯笼菜刀王 于 2012-7-27 02:23 编辑
不用自己写,, 找到Scene_Status, 复制一份
第一行 class Scene_Status
1
把它和原来的区分开,后面随便塞个符号
初始化, 把它指定队伍1号的位置.
def initialize(actor_index = 0, equip_index = 0)
@actor_index =
0
end
下面的刷新, 把按下R键, 按下L键的两段全删掉, 搞定收工
调用窗口就写这样 $scene = Scene_Status
1
.new
完成
作者:
aaalbx
时间:
2012-7-27 09:46
灯笼菜刀王 发表于 2012-7-27 02:22
不用自己写,, 找到Scene_Status, 复制一份
第一行 class Scene_Status1 把它和原来的区分开, ...
不过您误会了,也怪敝人没写清楚,帖子已经编正
敝人指的是战斗状态栏。。。。。。
作者:
灯笼菜刀王
时间:
2012-7-27 11:36
本帖最后由 灯笼菜刀王 于 2012-7-27 11:38 编辑
同样的,复制一份 Window_BattleStatus
class Window_BattleStatus
1
< Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 320, 640, 160)
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
refresh
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
super
end
#--------------------------------------------------------------------------
# ● 设置升级标志
# actor_index : 角色索引
#--------------------------------------------------------------------------
def level_up(actor_index)
@level_up_flags[actor_index] = true
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
#
for i in 0...$game_party.actors.size 取消循环
actor = $game_party.actors[
0
] #把ACTOR指定在队伍第一个位置
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
if @level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 主界面的不透明度下降
if $game_temp.battle_main_phase
self.contents_opacity -= 4 if self.contents_opacity > 191
else
self.contents_opacity += 4 if self.contents_opacity < 255
end
end
end
然后Scene_Battle 1 里面, 初始化战斗状态窗口地方改成 显示这个类 @status_window = Window_BattleStatus
1
.new
搞定收工
‘‘──灯笼菜刀王于2012-7-27 11:36补充以下内容:
同样的,复制一份 Window_BattleStatus
class Window_BattleStatus
1
< Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 320, 640, 160)
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
refresh
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
super
end
#--------------------------------------------------------------------------
# ● 设置升级标志
# actor_index : 角色索引
#--------------------------------------------------------------------------
def level_up(actor_index)
@level_up_flags[actor_index] = true
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
#
for i in 0...$game_party.actors.size 取消循环
actor = $game_party.actors[
0
] #把ACTOR指定在队伍第一个位置
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
if @level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
#end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 主界面的不透明度下降
if $game_temp.battle_main_phase
self.contents_opacity -= 4 if self.contents_opacity > 191
else
self.contents_opacity += 4 if self.contents_opacity < 255
end
end
end
然后Scene_Battle 1 里面, 初始化战斗状态窗口地方改成 显示这个类 @status_window = Window_BattleStatus
1
.new
搞定收工
’’
作者:
aaalbx
时间:
2012-7-27 20:08
@忧雪の伤
非常感谢!呃,难道现在没手动认可了吗?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1