Project1
标题:
独立战斗框脚本问题。
[打印本页]
作者:
遐想之荧
时间:
2008-12-16 05:50
提示:
作者被禁止或删除 内容自动屏蔽
作者:
TERENCE
时间:
2008-12-16 07:34
LZ還用了矩形槽的脚本??
因为LZ MS多加了槽值脚本,我大概推敲了一下矩形槽应该不会被影响,
所以给了以下脚本!!
LZ 試試
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
# 显示战斗画面同伴状态的窗口。
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
if $game_switches[15]
super(320 - $game_party.actors.size*80, 320, 160*$game_party.actors.size, 160)
@w = []
for i in 0..$game_party.actors.size-1
@w[i] = Window_Base.new(320 - $game_party.actors.size*80 + i*160,320,160,160)
@w[i].back_opacity = 0
end
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
refresh
else
super(0, 320, 640, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 100
@level_up_flags = [false, false, false, false]
refresh
end
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
if $game_switches[15]
for w in @w
w.dispose
end
super
else
super
end
end
#--------------------------------------------------------------------------
# ● 设置升级标志
# actor_index : 角色索引
#--------------------------------------------------------------------------
def level_up(actor_index)
@level_up_flags[actor_index] = true
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
actor_x = i * 160 + 4
actor = $game_party.actors[i]
#------------------------------------------------------------------------
# ★ 矩形槽调用
#------------------------------------------------------------------------
EXP(actor,actor_x-26,22,98)
HP(actor,actor_x-4,1123,98)
MP(actor,actor_x-4,111,98)
#------------------------------------------------------------------------
# ● 各种文字调用
#------------------------------------------------------------------------
draw_actor_hp(actor, actor_x-16, 22, 136)
draw_actor_sp(actor, actor_x-16, 50, 136)
draw_actor_name(actor, actor_x, -5)
if @level_up_flags[i]
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 > 255
else
self.contents_opacity += 4 if self.contents_opacity < 255
end
end
end
复制代码
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
3nξhα0_lim
时间:
2008-12-16 08:09
提示:
作者被禁止或删除 内容自动屏蔽
作者:
遐想之荧
时间:
2008-12-16 18:20
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1