赞 | 0 |
VIP | 2 |
好人卡 | 1 |
积分 | 6 |
经验 | 27196 |
最后登录 | 2023-12-29 |
在线时间 | 169 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 579
- 在线时间
- 169 小时
- 注册时间
- 2008-10-29
- 帖子
- 431
|
实现
在行走状态下 显示血条么?
以前有个显示人物坐标的脚本
在那个基础上可以改出这个
-。-
我是这样做出这种效果的
也想不出什么再好的办法了-。-
- #==========================================================================
- # 本脚本来自http://rpg.blue/web/htm/,用于任何游戏请保留此信息。别以为加密就可以del哦
- #==========================================================================
- XY_SWITCH = 25
- $upPL = false # 当25号开关打开,本脚本才开始工作。
- #==============================================================================
- # ■ Window_XY
- #------------------------------------------------------------------------------
- # 显示坐标的窗口。
- #==============================================================================
- class Window_xy < Window_Base#注意前面那个window_xy是文件名
- #--------------------------------------------------------------------------
- # ● 初始化窗口
- #--------------------------------------------------------------------------
-
- def initialize
- super(0, 400, 640, 100)#最后面那个数字是宽要显示多个需要改大,前面一个是长~
- self.contents = Bitmap.new(width - 32, height - 32)
- self.back_opacity = 0 # 这个是背景透明
- self.opacity = 0 # 这个是边框和背景都透明
- self.contents_opacity = 255 # 这个是内容透明
- self.visible = false
-
- self.z = 11
-
-
-
-
-
-
-
-
- refresh
- @x = $game_player.x
- @y = $game_player.y
- @id = $game_map.map_id
-
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
-
- if $game_switches[XY_SWITCH] #确定开关是否打开,可以自己改变开关
-
-
- @x = $game_player.x #获取角色X坐标
- @y = $game_player.y #获取角色Y坐标
- @id = $game_map.map_id #获取地图编号
- self.contents.clear #清除以前的东西
-
-
-
-
-
- ############################
- #draw_beijing
- end
- end
- #--------------------------------------------------------------------------
- # ● 判断文字刷新。节约内存用
- #--------------------------------------------------------------------------
- def judge
- return true if @x != $game_player.x
- return true if @y != $game_player.y
- return true if @id != $game_map.map_id
- return false
- end
- end
- #################################
- class Window_blue < Window_Base#注意前面那个window_xy是文件名
- #--------------------------------------------------------------------------
- # ● 初始化窗口
- #--------------------------------------------------------------------------
-
- def initialize
- super(-100, 400, 800, 100)#最后面那个数字是宽要显示多个需要改大,前面一个是长~
- self.contents = Bitmap.new(width - 32, height - 32)
- self.back_opacity = 0 # 这个是背景透明
- self.opacity = 0 # 这个是边框和背景都透明
- self.contents_opacity = 255 # 这个是内容透明
- self.visible = false
- self.z = 10
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @switch = $game_switches[XY_SWITCH]
- @switch2 = $game_switches[199]
- @switch3 = $game_switches[198]
-
-
- if $game_switches[XY_SWITCH] #确定开关是否打开,可以自己改变开关
-
- white = Color.new(0,21,120,120)
- #white = Color.new(255,255,255,225)
- self.contents.fill_rect(0,0,800,30,white)#############PL修改
- if $game_switches[199]
- bitmap=Bitmap.new("Graphics/pictures/smdmp")
- src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
- self.contents.blt(608, -7, bitmap, src_rect)
- end
- if $game_switches[198]
- bitmap=Bitmap.new("Graphics/pictures/smpr")
- src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
- self.contents.blt(600+43, -5, bitmap, src_rect)
- #self.contents.blt(600+41+37, -5, bitmap, src_rect)
- end
-
- end
- end
- #--------------------------------------------------------------------------
- # ● 判断文字刷新。节约内存用
- #--------------------------------------------------------------------------
- def judge
-
- if @switch != $game_switches[XY_SWITCH]or @switch2 != $game_switches[199] or @switch3 != $game_switches[198]
- return true
- else return false
- end
- end
-
- end
- ###########################################################################
- # 下面的东西不需要掌握~ #
- ###########################################################################
- class Scene_Map
- alias xy_66rpg_main main
- def main
-
- @move_window = Window_mover.new
- @move_windowback = Window_blue.new
- #@move_window = Window_mover.new#######################PL修改
-
- #####################33
-
-
-
-
-
-
-
- #####################33
- xy_66rpg_main
-
- @move_windowback.dispose########################PL修改
- @move_window.dispose########################PL修改
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- alias xy_66rpg_update update
- def update
- xy_66rpg_update
-
-
- if $game_switches[XY_SWITCH]
-
- @move_window.visible = true
- @move_windowback.visible = true
- @move_window.refresh if @move_window.judge or @move_windowback.judge
- @move_windowback.refresh if @move_windowback.judge
- #p 1 if @move_windowback.judge
-
- else
-
- @move_window.visible = false#############
- @move_windowback.visible = false
- end
- if $upPL != $game_switches[XY_SWITCH]
- $upPL = $game_switches[XY_SWITCH]
-
- end
- #@move_window. = false########################PL修改
-
- end
- end
- #==========================================================================
- # 本脚本来自http://rpg.blue/web/htm/,用于任何游戏请保留此信息。别以为加密就可以del哦
- #==========================================================================
- XY_SWITCH = 25
- ###################PL修改
- class Window_mover < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
-
- super(-15, 385, 640, 160)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = 0 #使透明
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 解放
- #--------------------------------------------------------------------------
-
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @actornum = $game_party.actors.size
-
- if $game_switches[XY_SWITCH]
- atnum = $game_party.actors.size
- @actornum = atnum
- for i in 0...atnum
- actor = $game_party.actors[i]
- draw_actor_hp(actor, 46+ 130* i, 0, 90, 99, 35, 5)#血槽
- draw_actor_sp(actor, 46+ 130* i, 9, 90, 99, 35, 5)#SP槽
- draw_actor_cp(actor, 46+ 130* i, 18, 90, 99, 35, 5)#CP槽
- end
- for i in 0...$game_party.actors.size
- mover = $game_party.actors[i]
- x = 9+ i * 130
- y = 17
- case mover.id
- when 1
- bitmap = Bitmap.new("Graphics/FACES/1")
- when 9
- bitmap = Bitmap.new("Graphics/FACES/9")
- when 10
- bitmap = Bitmap.new("Graphics/FACES/10")
- when 13
- bitmap = Bitmap.new("Graphics/FACES/13")
- end
- src_rect = Rect.new(0,0,100,60)
- self.contents.blt(x,y,bitmap,src_rect)
- end
- end
- end
-
-
-
- #####################################3
-
- ######################################
-
- def judge
- return true if @actornum != $game_party.actors.size
- end
- ################################################
- ###############################################
- end
复制代码 |
|