设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
12
返回列表 发新帖
楼主: guoyq1987
打印 上一主题 下一主题

[已经解决] 高手来看下这个脚本,有问题求教

[复制链接]

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

11
发表于 2013-2-17 17:52:10 | 只看该作者
  1.        when 0

  2.         x = 310

  3.         y = 390

  4.        when 1

  5.         x = 390

  6.         y = 340

  7.        when 2

  8.         x = 480

  9.         y = 300

  10.        when 3

  11.         x = 550

  12.         y = 270

  13.        when 4

  14.         x = 550

  15.         y = 500

复制代码
改成
  1.        when 0

  2.         x = 310

  3.         y = 390

  4.        when 1

  5.         x = 390

  6.         y = 340

  7.        when 2

  8.         x = 480

  9.         y = 300

  10.        when 3

  11.         x = 550

  12.         y = 270

  13.        when 4

  14.         x = 550

  15.         y = 500

  16.        when 5

  17.         x = 550

  18.         y = 500
复制代码
具体数字慢慢调整,其他以此类推

评分

参与人数 1星屑 +20 收起 理由
hcm + 20 感谢回答

查看全部评分

[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
32 小时
注册时间
2013-1-28
帖子
17
12
 楼主| 发表于 2013-2-19 19:37:36 | 只看该作者
芯☆淡茹水 发表于 2013-2-16 13:43
因为描绘各人物状态,必须先代入 size .如果 size 不改的话,始终描绘的最多就4人。所以 size 是必须改的 ...

呵呵,谢谢了,麻烦你了
http://dl.vmall.com/c0wlg6ondx
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
32 小时
注册时间
2013-1-28
帖子
17
13
 楼主| 发表于 2013-2-19 19:41:53 | 只看该作者
chd114 发表于 2013-2-17 17:52
把改成具体数字慢慢调整,其他以此类推

是过了,不过还是不行
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
33275
在线时间
5096 小时
注册时间
2012-11-19
帖子
4877

开拓者

14
发表于 2013-2-23 14:46:33 | 只看该作者
     已改好,把下面的脚本 复制 ,替换掉原来的外挂脚本“坐标修改”。

如果想自己再修改坐标的话,脚本里面有注释
  1. # ————————————————————————————————————
  2. # 本脚本来自http://www.66rpg.com/,转载请保留此信息
  3. # ————————————————————————————————————
  4. #==============================================================================
  5. # ■ Game_Actor
  6. #------------------------------------------------------------------------------
  7. #  处理角色的类。本类在 Game_Actors 类 ($game_actors)
  8. # 的内部使用、Game_Party 类请参考 ($game_party) 。
  9. #------------------------------------------------------------------------------
  10. #***** 要修改血条和显示的数值坐标,请在第 155 行 和 211 行开始,when 0 代表
  11. #      第一个角色,when 1 代表第二个角色,,,以此类推。
  12. #==============================================================================
  13. class Game_Actor < Game_Battler
  14. #--------------------------------------------------------------------------
  15. # ● 取得战斗画面的 X 坐标
  16. #--------------------------------------------------------------------------
  17. def screen_x
  18. case self.index
  19. when 0
  20.    return 370
  21. when 1
  22.    return 430
  23. when 2
  24.    return 520
  25. when 3
  26.    return 580
  27. when 4
  28.    return 540
  29.   end
  30. end
  31. #--------------------------------------------------------------------------
  32. # ● 取得战斗画面的 Y 坐标
  33. #--------------------------------------------------------------------------
  34. def screen_y
  35. case self.index
  36. when 0
  37.    return 450
  38. when 1
  39.    return 390
  40. when 2
  41.    return 350
  42. when 3
  43.    return 320
  44. when 4
  45.    return 460
  46.   end
  47. end
  48. #--------------------------------------------------------------------------
  49. # ● 取得战斗画面的 Z 坐标
  50. #--------------------------------------------------------------------------
  51. def screen_z
  52. case self.index
  53. when 0
  54.    return 0
  55. when 1
  56.    return 0
  57. when 2
  58.    return 0
  59. when 3
  60.    return 0
  61. when 4
  62.    return 0
  63.    end
  64. end
  65. end

  66. #==============================================================================
  67. # ■ Window_Base
  68. #------------------------------------------------------------------------------
  69. #  游戏中全部窗口的超级类。
  70. #==============================================================================
  71. class Window_Base < Window
  72. #--------------------------------------------------------------------------
  73. # ● 描绘 HP
  74. #     actor : 角色
  75. #     x     : 描画目标 X 坐标
  76. #     y     : 描画目标 Y 坐标
  77. #     width : 描画目标的宽
  78. #--------------------------------------------------------------------------
  79. def draw_actor_hp1(actor, x, y, width = 72)
  80.    # 描绘字符串 "HP"
  81.    self.contents.font.color = system_color
  82.    self.contents.draw_text(x, y, 24, 24, $data_system.words.hp)
  83.    # 计算描绘 MaxHP 所需的空间
  84.    if width - 24 >= 32
  85.      hp_x = x + 32# + width - 24
  86.    end
  87.    # 描绘 HP
  88.    self.contents.font.color = actor.hp == 0 ? knockout_color :
  89.      actor.hp <= actor.maxhp / 5 ? crisis_color : normal_color
  90.    self.contents.draw_text(hp_x, y, 32, 24, actor.hp.to_s, 2)
  91. end
  92. #--------------------------------------------------------------------------
  93. # ● 描绘 SP
  94. #     actor : 角色
  95. #     x     : 描画目标 X 坐标
  96. #     y     : 描画目标 Y 坐标
  97. #     width : 描画目标的宽
  98. #--------------------------------------------------------------------------
  99. def draw_actor_sp1(actor, x, y, width = 72)
  100.    # 描绘字符串 "SP"
  101.    self.contents.font.color = system_color
  102.    self.contents.draw_text(x, y, 24, 24, $data_system.words.sp)
  103.    # 计算描绘 MaxSP 所需的空间
  104.    if width - 24 >= 32
  105.      sp_x = x + 32# + width - 24
  106.    end
  107.    # 描绘 SP
  108.    self.contents.font.color = actor.sp == 0 ? knockout_color :
  109.      actor.sp <= actor.maxsp / 5 ? crisis_color : normal_color
  110.    self.contents.draw_text(sp_x, y, 32, 24, actor.sp.to_s, 2)
  111. end
  112. end



  113. #==============================================================================
  114. # ■ Window_BattleStatus
  115. #------------------------------------------------------------------------------
  116. #  显示战斗画面同伴状态的窗口。
  117. #==============================================================================
  118. class Window_BattleStatus < Window_Base
  119. #--------------------------------------------------------------------------
  120. # ● 初始化对像
  121. #--------------------------------------------------------------------------
  122. #$data_system_level_up_me = "Audio/ME/升级音乐"
  123. def initialize
  124.    super(0, 0, 640, 480)
  125.    self.contents = Bitmap.new(width - 10, height - 32)
  126.    self.opacity = 0
  127.    @level_up_flags = [false, false, false, false]
  128.    refresh
  129. end
  130. #--------------------------------------------------------------------------
  131. # ● 释放
  132. #--------------------------------------------------------------------------
  133. def dispose
  134.    super
  135. end
  136. #--------------------------------------------------------------------------
  137. # ● 设置升级标志
  138. #     actor_index : 角色索引
  139. #--------------------------------------------------------------------------
  140. def level_up(actor_index)
  141.    @level_up_flags[actor_index] = true
  142. end
  143. #--------------------------------------------------------------------------
  144. # ● 刷新
  145. #--------------------------------------------------------------------------
  146. def refresh
  147.    self.contents.clear
  148.    @item_max = $game_party.actors.size
  149.     for i in 0...$game_party.actors.size
  150.      actor = $game_party.actors[i]
  151.      case i
  152.        when 0
  153.         x = 310
  154.         y = 390
  155.        when 1
  156.         x = 390
  157.         y = 340
  158.        when 2
  159.         x = 480
  160.         y = 300
  161.        when 3
  162.         x = 550
  163.         y = 270
  164.         when 4
  165.         x = 510
  166.         y = 390
  167.       end
  168.      if @level_up_flags[i]
  169.        self.contents.font.color = normal_color
  170.        self.contents.draw_text(x, y, 80, 24, "         ")
  171.        Audio.me_stop
  172. #        Audio.me_play($data_system_level_up_me)
  173.      else
  174.      draw_actor_hp1(actor, x-15, y-15, 80)
  175.      draw_actor_sp1(actor, x-15, y+5, 80)
  176.     end
  177.    end
  178. end
  179. #--------------------------------------------------------------------------
  180. # ● 刷新画面
  181. #--------------------------------------------------------------------------
  182. def update
  183.    super
  184.    # 主界面的不透明度下降
  185.    if $game_temp.battle_main_phase
  186.      self.contents_opacity -= 50 if self.contents_opacity > 1
  187.    else
  188.      self.contents_opacity += 50 if self.contents_opacity < 255
  189.    end
  190. end
  191. end


  192. #==============================================================================
  193. # ■ Window_BattleStatus
  194. #==============================================================================
  195. class Window_BattleStatus < Window_Base
  196. #--------------------------------------------------------------------------
  197. # ● 初始化
  198. #--------------------------------------------------------------------------
  199. alias xrxs_bp2_refresh refresh
  200. def refresh
  201.    xrxs_bp2_refresh
  202.    @item_max = $game_party.actors.size
  203.     for i in 0...$game_party.actors.size
  204.      actor = $game_party.actors[i]
  205.      case i
  206.        when 0
  207.         x = 310
  208.         y = 390
  209.        when 1
  210.         x = 390
  211.         y = 340
  212.        when 2
  213.         x = 480
  214.         y = 300
  215.        when 3
  216.         x = 550
  217.         y = 270
  218.        when 4
  219.         x = 510
  220.         y = 390
  221.       end
  222.      draw_actor_hp_meter(actor, x, y, 50)
  223.      draw_actor_sp_meter(actor, x, y + 8, 50)
  224.    end
  225. end
  226. end
  227. #==============================================================================
  228. # ■ Window_Base
  229. #==============================================================================
  230. class Window_Base < Window
  231. #--------------------------------------------------------------------------
  232. # ● HP描画
  233. #--------------------------------------------------------------------------
  234. def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  235.    if type == 1 and actor.hp == 0
  236.      return
  237.    end
  238.    self.contents.font.color = system_color
  239.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 25))
  240.    w = width * actor.hp / actor.maxhp
  241.    self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
  242.    self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
  243.    self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
  244.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
  245.    self.contents.fill_rect(x, y+32, w,1, Color.new(0, 0, 0, 255))
  246.    
  247.    end
  248. #--------------------------------------------------------------------------
  249. # ● SP描画
  250. #--------------------------------------------------------------------------
  251. def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  252.    if type == 1 and actor.hp == 0
  253.      return
  254.    end
  255.    self.contents.font.color = system_color
  256.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  257.    w = width * actor.sp / actor.maxsp
  258.    self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
  259.    self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
  260.    self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
  261.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
  262.    self.contents.fill_rect(x, y+32, w,1, Color.new(0, 128, 128, 255))
  263.    
  264.    end
  265. end
复制代码

评分

参与人数 1梦石 +1 收起 理由
hcm + 1 认可答案

查看全部评分

xp vx va mv  va mz 各类型脚本/插件定制
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-6-27 23:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表