赞 | 0 |
VIP | 9 |
好人卡 | 61 |
积分 | 1 |
经验 | 20182 |
最后登录 | 2016-6-8 |
在线时间 | 470 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 470 小时
- 注册时间
- 2010-6-25
- 帖子
- 316
|
角色和敌人的左边右边可以自己调整的。
敌人的话直接在数据库里拉一下就好了。
角色的你在脚本编辑器里全局搜索“取得战斗画面的 X 坐标”“取得战斗画面的 Y 坐标”改改数字就有了。
头上显示血量的话应该有很多现成的脚本。下面这个只显示我方血量的。敌方的话你再搜索一下什么的。
另外战斗的话你可以使用“超级横版脚本”“全动画脚本”或者看下癫狂侠客的视频的战斗篇教学,就可以实现待机了。
- #==============================================================================
- # ■ Window_BattleStatus
- #------------------------------------------------------------------------------
- # 显示战斗画面同伴状态的窗口。
- #==============================================================================
- class Window_BattleStatus2 < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- #$data_system_level_up_me = "Audio/ME/升级音乐"
- def initialize
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 10, height - 32)
- self.opacity = 0
- @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
- actor2 = $game_party.actors[i]
- case i
- when 0
- x = 390
- y = 100
- when 1
- x = 430
- y = 120
- when 2
- x = 470
- y = 140
- when 3
- x = 510
- y = 160
- end
- if @level_up_flags[i]
- self.contents.font.color = normal_color
- self.contents.draw_text(x, y, 80, 24, "级别提升")
- Audio.me_stop
- # Audio.me_play($data_system_level_up_me)
- else
- # draw_actor_hp1(actor, x-15, y-15, 80)
- # draw_actor_sp1(actor, x-15, y+5, 80)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- super
- # 主界面的不透明度下降
- if $game_temp.battle_main_phase
- self.contents_opacity -= 50 if self.contents_opacity > 1
- else
- self.contents_opacity += 50 if self.contents_opacity < 255
- end
- end
- end
-
-
- #==============================================================================
- # ■ Window_BattleStatus
- #==============================================================================
- class Window_BattleStatus2 < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化
- #--------------------------------------------------------------------------
- alias xrxs_bp2_refresh refresh
- def refresh
- xrxs_bp2_refresh
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- actor2 = $game_party.actors[i]
- case i
- when 0
- x = 385
- y = 80
- when 1
- x = 420
- y = 110
- when 2
- x = 455
- y = 140
- when 3
- x = 490
- y = 170
- end
- draw_actor_hp_meter2(actor2, x, y, 50)
- draw_actor_sp_meter2(actor2, x, y + 4, 50)
- end
- end
- end
- #==============================================================================
- # ■ Window_Base
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● HP描画
- #--------------------------------------------------------------------------
- def draw_actor_hp_meter2(actor2, x, y, width = 156, type = 0)
- if type == 1 and actor2.hp == 0
- return
- end
- self.contents.font.color = system_color
- # self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 25))
- w = width * actor2.hp / actor2.maxhp
-
- self.contents.fill_rect(x, y+28, width,1, Color.new(99, 99, 99, 255))
- self.contents.fill_rect(x, y+29, width,1, Color.new(50, 50, 50, 255))
- self.contents.fill_rect(x, y+30, width,1, Color.new(50, 50, 50, 255))
- self.contents.fill_rect(x, y+31, width,1, Color.new(70, 70, 70, 255))
-
-
- self.contents.fill_rect(x, y+28, w,1, Color.new(24, 162, 32, 255))
- self.contents.fill_rect(x, y+29, w,1, Color.new(49, 198, 57, 255))
- self.contents.fill_rect(x, y+30, w,1, Color.new(24, 162, 32, 255))
- self.contents.fill_rect(x, y+31, w,1, Color.new(18, 127, 24, 255))
-
- end
- #--------------------------------------------------------------------------
- # ● SP描画
- #--------------------------------------------------------------------------
- def draw_actor_sp_meter2(actor2, x, y, width = 156, type = 0)
- if type == 1 and actor2.hp == 0
- return
- end
- self.contents.font.color = system_color
- # self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
- w = width * actor2.sp / actor2.maxsp
-
-
- self.contents.fill_rect(x, y+28, width,1, Color.new(99, 99, 99, 255))
- self.contents.fill_rect(x, y+29, width,1, Color.new(50, 50, 50, 255))
- self.contents.fill_rect(x, y+30, width,1, Color.new(50, 50, 50, 255))
- self.contents.fill_rect(x, y+31, width,1, Color.new(70, 70, 70, 255))
-
- self.contents.fill_rect(x, y+28, w,1, Color.new(25, 95, 225, 255))
- self.contents.fill_rect(x, y+29, w,1, Color.new(62, 129, 225, 255))
- self.contents.fill_rect(x, y+30, w,1, Color.new(25, 95, 225, 255))
- self.contents.fill_rect(x, y+31, w,1, Color.new(18, 63, 147, 255))
- end
- end
复制代码 |
|