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

Project1

 找回密码
 注册会员
搜索
查看: 1807|回复: 5
打印 上一主题 下一主题

[已经解决] 有關某ATB 系統的Z值問題

[复制链接]

Lv1.梦旅人

梦石
0
星屑
180
在线时间
54 小时
注册时间
2012-12-28
帖子
31
跳转到指定楼层
1
发表于 2013-9-9 21:56:26 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 wai781300 于 2013-9-10 09:46 编辑

近來使用了一個ATB系統腳本
ATB系統腳本傳送門

得出了如下效果


見到敵人的AP顯示條蓋上了
MOG_Hunter的立繪顯示腳本上

我去修改過mog_hunter裡立繪腳本的z值,可是不論改多高, ap條還是蓋過了立繪

求解答方法...爬過文也不懂如何自己修改...求賜教
以下是AP描畫的腳本(由於整個ATB系統涉及的腳本數太多,全部貼上會很可怕,所以揀取兩個看上去最大關連的)

RUBY 代码复制
  1. #==============================================================================
  2. # ■ Sprite_Battler
  3. #==============================================================================
  4. class Sprite_Battler < Sprite_Base
  5.   #--------------------------------------------------------------------------
  6.   # ● オブジェクト初期化
  7.   #--------------------------------------------------------------------------
  8.   alias :atb_initialize :initialize
  9.   def initialize(viewport, battler = nil)
  10.     atb_initialize(viewport, battler)
  11.     @gauge_sprite = Spriteset_Enemy_Gauge.new(battler, viewport) if
  12.                                           battler and battler.enemy?
  13.   end
  14.   #--------------------------------------------------------------------------
  15.   # ● 解放
  16.   #--------------------------------------------------------------------------
  17.   alias :atb_dispose :dispose
  18.   def dispose
  19.     @gauge_sprite.dispose if @gauge_sprite
  20.     atb_dispose
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● 位置の更新
  24.   #--------------------------------------------------------------------------
  25.   alias :atb_update_position :update_position
  26.   def update_position
  27.     atb_update_position
  28.     @gauge_sprite.update_rect(self.x, self.y, self.z) if @gauge_sprite
  29.   end
  30. end
  31.  
  32. #==============================================================================
  33. # ■ Spriteset_Enemy_Gauge
  34. #==============================================================================
  35. class Spriteset_Enemy_Gauge
  36.   def initialize(battler, viewport)
  37.     @sprites = Array.new(4) {|i| Sprite_Enemy_Gauge.new(battler, viewport, i)}
  38.   end
  39.   def refresh_status
  40.     @sprites.each {|sprite| sprite.refresh}
  41.   end
  42.   def refresh_ap
  43.     @sprites[3].refresh
  44.   end
  45.   def dispose
  46.     @sprites.each {|sprite| sprite.dispose}
  47.   end
  48.   def update_rect(x, y, z)
  49.     @sprites.each {|sprite| sprite.update_rect(x, y, z)}
  50.   end
  51. end
  52.  
  53. #==============================================================================
  54. # ■ Sprite_Enemy_Gauge
  55. #==============================================================================
  56. class Sprite_Enemy_Gauge < Sprite_Base
  57.   #--------------------------------------------------------------------------
  58.   # ● オブジェクト初期化
  59.   #--------------------------------------------------------------------------
  60.   def initialize(battler, viewport, gauge_number = nil)
  61.     super(Viewport.new(0, 0, Graphics.width, Graphics.height))
  62.     self.viewport.z = 0
  63.     self.bitmap = Bitmap.new(Graphics.width, Graphics.height)
  64.     @gauge_number = gauge_number
  65.     [url=home.php?mod=space&uid=133701]@battler[/url] = battler
  66.     if battler.is_a?(Game_Enemy)
  67.       @gauge_width = battler.gauge_width(@gauge_number)
  68.       @gauge_high = battler.gauge_high
  69.     else
  70.       @gauge_width = 100
  71.       @gauge_high = 0
  72.     end
  73.   end
  74.   #--------------------------------------------------------------------------
  75.   # ● APゲージ表示位置を更新
  76.   #--------------------------------------------------------------------------
  77.   def update_rect(x, y, z)
  78.     self.viewport.rect.x = x - @gauge_width / 2
  79.     self.viewport.rect.y = y - @gauge_high
  80.     self.viewport.rect.y += ATB::ENEMY_GAUGE_POS_DATA[@gauge_number]
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # ● APゲージ消去
  84.   #--------------------------------------------------------------------------
  85.   def clear
  86.     self.bitmap.clear
  87.   end
  88.   #--------------------------------------------------------------------------
  89.   # ● ゲージの描画
  90.   #--------------------------------------------------------------------------
  91.   def refresh
  92.     if @battler.draw_gauge?(@gauge_number)
  93.       draw_gauge
  94.     else
  95.       clear
  96.     end
  97.   end
  98.   #--------------------------------------------------------------------------
  99.   # ● APゲージの描画
  100.   #--------------------------------------------------------------------------
  101.   def draw_gauge
  102.     data = gauge_data
  103.     rate = data[0]
  104.     color = data[1]
  105.     rate = 0.0 if rate < 0.0 or rate.nan?
  106.     rate = 1.0 if rate > 1.0
  107.     fill_w = (@gauge_width * rate).to_i
  108.     color[0].alpha = ATB::ENEMY_AP_GAUGE_ALPHA
  109.     color[1].alpha = ATB::ENEMY_AP_GAUGE_ALPHA
  110.     self.bitmap.fill_rect(0, 0, @gauge_width, 6, color[0])
  111.     self.bitmap.gradient_fill_rect(0, 0, fill_w, 6,color[1], color[2])
  112.   end
  113.   #--------------------------------------------------------------------------
  114.   # ● ゲージの内容
  115.   #--------------------------------------------------------------------------
  116.   def gauge_data
  117.     case @gauge_number
  118.     when 0; rate = @battler.hp / @battler.mhp.to_f
  119.     when 1; rate = @battler.mp / @battler.mmp.to_f
  120.     when 2; rate = @battler.tp / @battler.max_tp.to_f
  121.     when 3; return [@battler.ap_rate, @battler.ap_gauge_color]
  122.     end
  123.     return [rate, ATB::ENEMY_GAUGE_COLOR_DATA[@gauge_number]]
  124.   end
  125. end
  126.  
  127. #==============================================================================
  128. # ■ Game_Enemy
  129. #==============================================================================
  130. class Game_Enemy < Game_Battler
  131.   #--------------------------------------------------------------------------
  132.   # ● ゲージを描画するか
  133.   #--------------------------------------------------------------------------
  134.   def draw_gauge?(gauge_number)
  135.     return false if not alive?
  136.     return false if $game_switches[ATB::ENEMY_AP_GAUGE_HIDE_SWITCH] == true
  137.     return false if ATB::ENEMY_AP_GAUGE_HIDE_IN_TURN and BattleManager.in_turn?
  138.     return false if $game_temp.ap_gauge_hide_by_anime != []
  139.     feature_objects.each do |obj|
  140.       return !ATB::ENEMY_GAUGE_DRAW_DATA[gauge_number] if obj.no_draw_gauge(gauge_number)
  141.     end
  142.     return ATB::ENEMY_GAUGE_DRAW_DATA[gauge_number]
  143.   end
  144.   #--------------------------------------------------------------------------
  145.   # ● ゲージの長さ
  146.   #--------------------------------------------------------------------------
  147.   def gauge_width(gauge_number)
  148.     case gauge_number
  149.     when 0; return $1.to_i if enemy.note =~ /<HPゲージ長さ=(\d+)>/
  150.     when 1; return $1.to_i if enemy.note =~ /<MPゲージ長さ=(\d+)>/
  151.     when 2; return $1.to_i if enemy.note =~ /<TPゲージ長さ=(\d+)>/
  152.     when 3; return $1.to_i if enemy.note =~ /<APゲージ長さ=(\d+)>/
  153.     end
  154.     return ATB::ENEMY_GAUGE_WIDTH_DATA[gauge_number]
  155.   end
  156.   #--------------------------------------------------------------------------
  157.   # ● ゲージのy座標(縦の位置)
  158.   #--------------------------------------------------------------------------
  159.   def gauge_high
  160.     return enemy.note =~ /<ゲージ高さ=(\-*\d+)>/ ? $1.to_i : 0
  161.   end
  162. end
  163.  
  164. class RPG::BaseItem
  165.   def no_draw_gauge(gauge_number)
  166.     unless @no_draw_gauge
  167.       @no_draw_gauge = []
  168.       for i in 0..3
  169.         case i
  170.         when 0; match = /<HPゲージ表示>/
  171.         when 1; match = /<MPゲージ表示>/
  172.         when 2; match = /<TPゲージ表示>/
  173.         when 3; match = /<APゲージ表示>/
  174.         end
  175.         @no_draw_gauge[i] = @note =~ match ? true : false
  176.       end
  177.     end
  178.     return @no_draw_gauge[gauge_number]
  179.   end
  180. end


以下是設定

RUBY 代码复制
  1. module ATB
  2.   #--------------------------------------------------------------------------
  3.   # ● 設定項目
  4.   #--------------------------------------------------------------------------  
  5.  
  6.   #軽量化設定
  7.   #AP増加処理を頻繁に行うと動作環境によっては処理落ちする
  8.   #REFRESH_FRAMEの値を大きくすると、AP増加処理の間隔を長くして処理を軽くする
  9.  
  10.   #AP増加処理の間隔 3にすると3フレームに一回処理を行う
  11.   REFRESH_FRAME = 3
  12.  
  13.  
  14.   #味方AP情報に"AP"の文字を表示するか
  15.   AP_GAUGE_NAME = true
  16.   AP_GAUGE_NAME_TEXT_COLOR = Color.new(132, 170, 255)   #文字色
  17.  
  18.   #味方AP情報にAPの溜まり具合(パーセンテージ)を表示するか
  19.   AP_GAUGE_PERCENT = true
  20.   #AP_GAUGE_PERCENTをtrueにした場合のみ APの溜まり具合に"%"を付けるかどうか
  21.   AP_GAUGE_SIGN = true
  22.   AP_GAUGE_MAIN_TEXT_COLOR = Color.new(255, 255, 255)  #文字色
  23.  
  24.  
  25.  
  26.   #敵ゲージの不透明度 255で完全に不透明 0で透明
  27.   ENEMY_AP_GAUGE_ALPHA = 128
  28.  
  29.   #敵ゲージの設定 [HP, MP, TP, AP] の順番
  30.   ENEMY_GAUGE_DRAW_DATA  = [false, false, false, true]  # 表示するかどうか
  31.   ENEMY_GAUGE_POS_DATA   = [-18, -2, 8, -10]            # y座標(縦の位置)補正値
  32.   ENEMY_GAUGE_WIDTH_DATA = [100, 100, 80, 100]          # 長さデフォルト値
  33.  
  34.   #敵HP、MP、TPゲージの色 [背景,左側,右側]
  35.   ENEMY_HP_GAUGE_COLOR = [Color.new( 32,  32,  64),   # text_color(19)と同じ
  36.                           Color.new(224, 128,  64),   # text_color(20)
  37.                           Color.new(240, 192,  64)]   # text_color(21)
  38.   ENEMY_MP_GAUGE_COLOR = [Color.new( 32,  32,  64),   # text_color(19)
  39.                           Color.new( 64, 128, 192),   # text_color(22)
  40.                           Color.new( 64, 192, 240)]   # text_color(23)
  41.   ENEMY_TP_GAUGE_COLOR = [Color.new( 32,  32,  64),   # text_color(19)
  42.                           Color.new(  0, 160,  64),   # text_color(28)
  43.                           Color.new(  0, 224,  96)]   # text_color(29)
  44.  
  45.   #敵ゲージ非表示設定
  46.   ENEMY_AP_GAUGE_HIDE_SWITCH = 91      #スイッチがオンになっている間
  47.   ENEMY_AP_GAUGE_HIDE_IN_TURN = true #ターン中
  48.   ENEMY_AP_GAUGE_HIDE_ANIMATION =     #アニメーション表示中
  49.   [7, 13] # 7:斬撃/物理 13:刺突/物理
  50.  
  51. end


MOG_HUNTER的立繪腳本

RUBY 代码复制
  1. #==============================================================================
  2. # +++ MOG - ACTOR PICTURE CM  (v1.2) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # [url]http://www.atelier-rgss.com/[/url]
  6. #==============================================================================
  7. # Apresenta a imagem do personagem durante a seleção de comandos, com efeitos
  8. # animados.
  9. #==============================================================================
  10. # ● Definindo o nome das imagens dos battlers.
  11. #==============================================================================
  12. # 1 - As imagens devem ser gravadas na pasta
  13. #
  14. # GRAPHICS/PICTURES
  15. #
  16. # 2 - Nomeie os  arquivos de imagens da seguinte forma.
  17. #
  18. #
  19. # ACTOR + ID
  20. #
  21. # EG
  22. #
  23. # ACTOR1.png
  24. #
  25. #==============================================================================
  26.  
  27. #==============================================================================
  28. # ● Histórico (Version History)
  29. #==============================================================================
  30. # v 1.2 - Ajuste automático da imagem do battler.
  31. # v 1.1 - Correção do bug de não apagar a imagem quando o battler usa
  32. #         ações de que acertam todos os alvos.
  33. #==============================================================================
  34.  
  35. module MOG_ACTOR_PICTURE_CM
  36.   #Posição da imagem do battler. (Para fazer ajustes)
  37.   PICTURE_POSITION = [45, -10]  
  38.  
  39.   #Definição da opacidade da imagem.
  40.   PICTURE_OPACITY = 255
  41.  
  42.   #Velocidade de deslize
  43.   SLIDE_SPEED = 30  
  44.  
  45.   #Ativar o efeito da imagem respirando.
  46.   BREATH_EFFECT = true
  47.  
  48.   #Definição da prioridade  da imagem na tela.
  49.   PICTURE_PRIORITY_Z = 100
  50. end
  51.  
  52. #===============================================================================
  53. # ■ Sprite_Battler_CM
  54. #===============================================================================
  55. class Sprite_Battler_CM < Sprite
  56.   include MOG_ACTOR_PICTURE_CM
  57.  
  58.   #--------------------------------------------------------------------------
  59.   # ● Initialize
  60.   #--------------------------------------------------------------------------  
  61.   def initialize(viewport = nil,battler_id = -1)
  62.       super(viewport)
  63.       filename = "Actor" + battler_id.to_s
  64.       self.bitmap = Cache.picture(filename) rescue nil
  65.       self.bitmap = Cache.picture("") if self.bitmap == nil
  66.       sc = (544 / 2)  - (self.bitmap.width / 2) + PICTURE_POSITION[0]
  67.       @size = [self.bitmap.width + PICTURE_POSITION[0] ,sc]      
  68.       self.visible = false
  69.       self.opacity = 0
  70.       self.z = PICTURE_PRIORITY_Z
  71.       self.ox = 0
  72.       self.oy = self.bitmap.height
  73.       self.x = -@size[0]
  74.       self.y = (Graphics.height + 10) + PICTURE_POSITION[1]      
  75.       @breach_effect = [1.0,0]
  76.       @battler_id = battler_id
  77.       @active =  false
  78.       @cm_visible = false
  79.   end  
  80.  
  81.   #--------------------------------------------------------------------------
  82.   # ● Dispose
  83.   #--------------------------------------------------------------------------  
  84.   def dispose
  85.       super
  86.       self.bitmap.dispose
  87.   end
  88.  
  89.   #--------------------------------------------------------------------------
  90.   # ● Update
  91.   #--------------------------------------------------------------------------  
  92.   def update
  93.       super
  94.       update_slide
  95.   end  
  96.  
  97.   #--------------------------------------------------------------------------
  98.   # ● Active Battler
  99.   #--------------------------------------------------------------------------      
  100.   def active_battler(battler_id)
  101.       @active = @battler_id == battler_id ? true : false
  102.       self.visible = true if @active
  103.       @cm_visible = false if !@active
  104.   end
  105.  
  106.   #--------------------------------------------------------------------------
  107.   # ● Refresh Battler CM
  108.   #--------------------------------------------------------------------------        
  109.   def refresh_battler(cm_visible, battler_index)
  110.       @cm_visible = cm_visible
  111.       active_battler(battler_index)
  112.   end  
  113.  
  114.   #--------------------------------------------------------------------------
  115.   # ● Update Slide
  116.   #--------------------------------------------------------------------------  
  117.   def update_slide
  118.       if !@cm_visible
  119.            self.x -= SLIDE_SPEED if self.x > -@size[0]
  120.            self.opacity -= 25
  121.            if self.x <= -@size[0] or self.opacity == 0
  122.               self.visible = false
  123.               self.opacity = 0
  124.               self.x = -@size[0]
  125.            end   
  126.         else
  127.            self.x += SLIDE_SPEED if self.x < @size[1]
  128.            self.x = @size[1] if self.x > @size[1]
  129.            self.opacity += 10 if self.opacity < PICTURE_OPACITY
  130.            self.opacity = PICTURE_OPACITY if self.opacity > PICTURE_OPACITY
  131.            update_breath_effect
  132.       end         
  133.   end
  134.  
  135.   #--------------------------------------------------------------------------
  136.   # ● Update Breath Effect
  137.   #--------------------------------------------------------------------------   
  138.   def update_breath_effect
  139.       return if !BREATH_EFFECT
  140.       @breach_effect[1] += 1
  141.       case @breach_effect[1]
  142.          when 0..30
  143.              @breach_effect[0] += 0.0004
  144.          when 31..50
  145.              @breach_effect[0] -= 0.0004
  146.          else  
  147.          @breach_effect[1] = 0
  148.          @breach_effect[0] = 1.truncate
  149.       end
  150.       self.zoom_y = @breach_effect[0]
  151.   end  
  152.  
  153. end
  154.  
  155. #===============================================================================
  156. # ■ Spriteset_Battle
  157. #===============================================================================
  158. class Spriteset_Battle
  159.  
  160.   #--------------------------------------------------------------------------
  161.   # ● Create Actors
  162.   #--------------------------------------------------------------------------   
  163.   alias mog_battler_cm_create_actors create_actors
  164.   def create_actors
  165.       mog_battler_cm_create_actors
  166.       create_battler_pictures
  167.   end
  168.  
  169.   #--------------------------------------------------------------------------
  170.   # ● Dispose
  171.   #--------------------------------------------------------------------------   
  172.   alias mog_battler_cm_dispose dispose
  173.   def dispose
  174.       mog_battler_cm_dispose
  175.       dispose_battler_cm
  176.   end  
  177.  
  178.   #--------------------------------------------------------------------------
  179.   # ● Update
  180.   #--------------------------------------------------------------------------   
  181.   alias mog_battler_cm_update update
  182.   def update
  183.       mog_battler_cm_update
  184.       update_battler_cm
  185.   end   
  186.  
  187.   #--------------------------------------------------------------------------
  188.   # ● Create Battler Pictures
  189.   #--------------------------------------------------------------------------   
  190.   def create_battler_pictures
  191.       size = 0
  192.       @battler_pictures = []
  193.       for i in $game_party.members
  194.           @battler_pictures.push(Sprite_Battler_CM.new(@viewport1,i.id))
  195.           size += 1
  196.           break if size > 3
  197.       end   
  198.   end   
  199.  
  200.   #--------------------------------------------------------------------------
  201.   # ● Dispose Battler CM
  202.   #--------------------------------------------------------------------------   
  203.   def dispose_battler_cm
  204.       return if @battler_pictures == nil
  205.       @battler_pictures.each {|sprite| sprite.dispose }
  206.   end  
  207.  
  208.   #--------------------------------------------------------------------------
  209.   # ● Update Battler CM
  210.   #--------------------------------------------------------------------------   
  211.   def update_battler_cm
  212.       return if @battler_pictures == nil
  213.       @battler_pictures.each {|sprite| sprite.update }
  214.   end   
  215.  
  216.   #--------------------------------------------------------------------------
  217.   # ● Update CM Pictures
  218.   #--------------------------------------------------------------------------      
  219.   def update_cm_picture(cm_visible, battler_index)
  220.       return if @battler_pictures == nil
  221.       @battler_pictures.each {|sprite| sprite.refresh_battler(cm_visible, battler_index) }
  222.   end  
  223.  
  224. end
  225.  
  226. #===============================================================================
  227. # ■ Scene_Battle
  228. #===============================================================================
  229. class Scene_Battle < Scene_Base
  230.  
  231.   #--------------------------------------------------------------------------
  232.   # ● Update
  233.   #--------------------------------------------------------------------------        
  234.   alias mog_cm_picture_update update
  235.   def update
  236.       mog_cm_picture_update  
  237.       update_picture_visible
  238.   end  
  239.  
  240.   #--------------------------------------------------------------------------
  241.   # ● Update Battler CM Active
  242.   #--------------------------------------------------------------------------      
  243.   def update_picture_visible
  244.       return if @actor_command_window == nil
  245.       cm_visible = can_cm_picture_visible?      
  246.       cm_id = BattleManager.actor.id rescue -1
  247.       @spriteset.update_cm_picture(cm_visible, cm_id)
  248.   end  
  249.  
  250.   #--------------------------------------------------------------------------
  251.   # ● Can CM Picture Visible
  252.   #--------------------------------------------------------------------------        
  253.   def can_cm_picture_visible?
  254.       return false if (@actor_window.active or @enemy_window.active) rescue return
  255.       return false if BattleManager.actor == nil      
  256.       return true
  257.   end  
  258.  
  259.   #--------------------------------------------------------------------------
  260.   # ● Execute Action
  261.   #--------------------------------------------------------------------------        
  262.   alias mog_cm_picture_execute_action execute_action
  263.   def execute_action
  264.       @spriteset.update_cm_picture(false, -1) if @spriteset != nil
  265.       mog_cm_picture_execute_action
  266.   end
  267.  
  268. end
  269.  
  270. $mog_rgss3_actor_picture_cm = true


PS:我知道可以關掉敵人的AP條,可是覺得這樣失去了ATB系統的意義...所以不太希望就是...希望提供解決方法 謝謝

点评

moy
忘记点回复了。。点评提醒一下,你看这样的解决方式是否合适  发表于 2013-9-9 22:41

Lv2.观梦者

无节操

梦石
0
星屑
607
在线时间
795 小时
注册时间
2009-2-6
帖子
3939

开拓者贵宾

2
发表于 2013-9-9 22:40:25 | 只看该作者
我记得在某贴看到过类似的问题,问题的核心在于,修改z值只是在一个viewport内,而显示图片与绘制ap槽在两个不同的viewport,其中图片是优先级较低的一个,所以总是显示在下面。
除了将两者放入同一个viewport这样变扭的更改之外,不知楼主是否考虑在显示图片时(也就是你这个立绘),暂时屏蔽敌人的ap,这样就规避了这个问题。在你提供的脚本中也确实有这样的操作,应该可以实现。
  1.   #敵ゲージ非表示設定
  2.   ENEMY_AP_GAUGE_HIDE_SWITCH = 91      #スイッチがオンになっている間
  3.   ENEMY_AP_GAUGE_HIDE_IN_TURN = true #ターン中
  4.   ENEMY_AP_GAUGE_HIDE_ANIMATION =     #アニメーション表示中
复制代码
如果你必须立绘和ap同时显示……那么既然ap必然会被挡住……是否有必要即使挡住也要描绘?

点评

in turn那個我一開始也以為是主角行動時ap不顯示,結果是...敵人行動時ap不顯示... 可是我又不想用開關直接把ap關掉...ap擋住沒關係  发表于 2013-9-9 23:09
Brandnew day, Brandnew Life
                              实在  中
暂为素材区版主,版其  琢磨
应援一下~
RPG制作大师授权素材推广计划
回复 支持 反对

使用道具 举报

Lv2.观梦者

无节操

梦石
0
星屑
607
在线时间
795 小时
注册时间
2009-2-6
帖子
3939

开拓者贵宾

3
发表于 2013-9-10 00:02:18 | 只看该作者
  1. class Sprite_Enemy_Gauge < Sprite_Base
  2.   #--------------------------------------------------------------------------
  3.   # ● オブジェクト初期化
  4.   #--------------------------------------------------------------------------
  5.   def initialize(battler, viewport, gauge_number = nil)
  6.     super(Viewport.new(0, 0, Graphics.width, Graphics.height))
  7.     self.viewport.z = 0
复制代码
那么就在如这样的位置直接更改viewport的值吧……我才注意到他是新建的viewport……你可以改个略大一点的值(越大越靠后)图片的viewport用的是viewport2,也就是50 , 0好像是最高的。。。要不你给这个改成60试试,我自己没改过viewport的东西……

点评

不然我把其他腳本也貼上來?如果上面網址開不了的話  发表于 2013-9-10 09:33
Brandnew day, Brandnew Life
                              实在  中
暂为素材区版主,版其  琢磨
应援一下~
RPG制作大师授权素材推广计划
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
180
在线时间
54 小时
注册时间
2012-12-28
帖子
31
4
 楼主| 发表于 2013-9-10 09:32:23 | 只看该作者
  1. class Sprite_Enemy_Gauge < Sprite_Base
  2.   #--------------------------------------------------------------------------
  3.   # ● オブジェクト初期化
  4.   #--------------------------------------------------------------------------
  5.   def initialize(battler, viewport, gauge_number = nil)
  6.     super(Viewport.new(0, 0, Graphics.width, Graphics.height))
  7.     self.viewport.z = viewport.z
复制代码
原來是這樣的
那個0好像是我亂改沒改回的東西
嘗試過調整self.viewport.z的值,100以上,100以下也試過
但怎樣也是蓋住了立繪
self.viewport.z=多少也是蓋住了立繪(:3_|Z
回复 支持 反对

使用道具 举报

Lv2.观梦者

无节操

梦石
0
星屑
607
在线时间
795 小时
注册时间
2009-2-6
帖子
3939

开拓者贵宾

5
发表于 2013-9-10 09:43:14 | 只看该作者
wai781300 发表于 2013-9-10 09:32
原來是這樣的
那個0好像是我亂改沒改回的東西
嘗試過調整self.viewport.z的值,100以上,100 ...

哎,不行吗
那我就搞不太明白了。看看有没有别人能帮你解决吧。viewport这一块我没仔细啃过
Brandnew day, Brandnew Life
                              实在  中
暂为素材区版主,版其  琢磨
应援一下~
RPG制作大师授权素材推广计划
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
180
在线时间
54 小时
注册时间
2012-12-28
帖子
31
6
 楼主| 发表于 2013-9-10 09:47:42 | 只看该作者
解決了 直接問日本那邊的製作者...
有關回覆:
スクリプトのセクション「50 敵APゲージ描画」の 2箇所 を変えます。

①61~63 行
> super(Viewport.new(0, 0, Graphics.width, Graphics.height))
> self.viewport.z = viewport.z
> self.bitmap = Bitmap.new(Graphics.width, Graphics.height)
これを変えて
> super(viewport)
> self.z = 101
> self.bitmap = Bitmap.new(Graphics.width, Graphics.height)
これにします。

②77~81行目
> def update_rect(x, y, z)
> self.viewport.rect.x = x - @gauge_width / 2
> self.viewport.rect.y = y - @gauge_high
> self.viewport.rect.y += ATB::ENEMY_GAUGE_POS_DATA[@gauge_number]
> end
これを変えて
> def update_rect(x, y, z)
> self.x = x - @gauge_width / 2
> self.y = y - @gauge_high
> self.y += ATB::ENEMY_GAUGE_POS_DATA[@gauge_number]
> end
これにします。


Z値(深さ)は 62行目
> self.z = 101
で調整できるようになります。

点评

moy
哦哦,解决了就好,棒~  发表于 2013-9-10 11:29
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-16 13:47

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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