加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 电车之熊 于 2015-11-15 23:17 编辑
我找了一个在场景中显示Hp、Mp条的脚本
class Scene_Map < Scene_Base #---------------------------------------------------------------------------- # * 重命名方法 #---------------------------------------------------------------------------- alias sm_sta start #---------------------------------------------------------------------------- # * 开始处理 #---------------------------------------------------------------------------- def start sm_sta @owt = Window_MapStatus.new end end #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- class Window_MapStatus < Window_Base def initialize super(0, 0, 273,144) self.opacity = 0 refresh end #---------------------------------------------------------------------------- # * 刷新画面 #---------------------------------------------------------------------------- def update super refresh if $refresh $refresh = false end #---------------------------------------------------------------------------- # * 更新内容 #---------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_hp($game_party.members[0], 60, 35, self.contents.width - 101) draw_actor_mp($game_party.members[0], 60, 95, self.contents.width - 101) end end ####################################################### class Game_Actor < Game_Battler #---------------------------------------------------------------------------- # * 重命名方法 #---------------------------------------------------------------------------- alias ms_refresh refresh #-------------------------------------------------------------------------- # * 刷新 #--------------------------------------------------------------------- def refresh ms_refresh $refresh = true end end
class Scene_Map < Scene_Base
#----------------------------------------------------------------------------
# * 重命名方法
#----------------------------------------------------------------------------
alias sm_sta start
#----------------------------------------------------------------------------
# * 开始处理
#----------------------------------------------------------------------------
def start
sm_sta
@owt = Window_MapStatus.new
end
end
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
class Window_MapStatus < Window_Base
def initialize
super(0, 0, 273,144)
self.opacity = 0
refresh
end
#----------------------------------------------------------------------------
# * 刷新画面
#----------------------------------------------------------------------------
def update
super
refresh if $refresh
$refresh = false
end
#----------------------------------------------------------------------------
# * 更新内容
#----------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_hp($game_party.members[0], 60, 35, self.contents.width - 101)
draw_actor_mp($game_party.members[0], 60, 95, self.contents.width - 101)
end
end
#######################################################
class Game_Actor < Game_Battler
#----------------------------------------------------------------------------
# * 重命名方法
#----------------------------------------------------------------------------
alias ms_refresh refresh
#--------------------------------------------------------------------------
# * 刷新
#---------------------------------------------------------------------
def refresh
ms_refresh
$refresh = true
end
end
但是我想在大地图中显示这条,在进入城镇地图中不显示Hp、Mp条,我希望在地图中加备注。
我照猫画虎将第12行该为
@owt = Window_MapStatus.new if map.note.include?("<EEE>")
@owt = Window_MapStatus.new if map.note.include?("<EEE>")
想表达的意思是当地图标注<EEE>显示Hp、Mp条,结果
我知道意思是没有定义map 。这种备注的方法是我按物品备注照猫画虎的,大家帮我看看怎么改。谢谢了 |