查看: 2189|回复: 15

[已经解决] 请教,横版战斗脚本的问题

[复制链接]
梦石
2
星屑
3034
在线时间
398 小时
注册时间
2016-8-16
回帖
92

开拓者

发表于 2017-7-7 12:43:17 | 显示全部楼层 |阅读模式

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

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

×
如题,在下在运用技能更换战斗背景时遇到了困难。
我想知道为什么我在第二次释放技能时背景消失了,可能我的写法有问题吧。下面我把我的写法发上来:
"无限剑制"        => ["特技启动","一歩前移动","背景无限剑制","anime(418,false)","450","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","对象动画","背景无限剑制的解除","坐标重置"],
"背景无限剑制"        => ["缩小","se('Blind',70)","无限剑制音乐","昏暗的背景","40","背景无限剑制变更","色调初始化"],
"背景无限剑制的解除"  => ["重置相机","昏暗的背景","40","背景无限剑制解除","色调初始化"],
请求大佬们的指教

第一次释放

第一次释放

第二次释放

第二次释放

老鹰

梦石
40
星屑
37812
在线时间
7091 小时
注册时间
2012-5-26
回帖
3297

极短24评委极短23参与极短22参与极短21评委老司机慢点开短篇十吟唱者组别冠军开拓者剧作品鉴家

发表于 2017-7-7 13:40:27 | 显示全部楼层
"背景无限剑制变更"  "背景无限剑制解除" 都是什么
是利用 图片显示 的设置还是其他?
回复

使用道具 举报

梦石
2
星屑
3034
在线时间
398 小时
注册时间
2016-8-16
回帖
92

开拓者

 楼主| 发表于 2017-7-7 13:43:51 | 显示全部楼层
本帖最后由 卫宫白 于 2017-7-7 13:51 编辑
百里_飞柳 发表于 2017-7-7 13:40
"背景无限剑制变更"  "背景无限剑制解除" 都是什么
是利用 图片显示 的设置还是其他? ...


是这个
● 背景的控制  画像变更自动进行滚动
"无限剑制"     => ["scroll", -6,  1, [  10,    0],  true,  "未命名", "未命名",  false],

点评

还是不行的说  发表于 2017-7-7 16:22
我去试试吧  发表于 2017-7-7 14:27
背景解除呢,不会只是改了个透明度但没有改回来吧  发表于 2017-7-7 14:20
我试过的,不行的  发表于 2017-7-7 14:10
最后那个允许插入改为true呢?  发表于 2017-7-7 13:51
回复

使用道具 举报

梦石
0
星屑
878
在线时间
576 小时
注册时间
2010-6-26
回帖
709
发表于 2017-7-7 23:18:35 | 显示全部楼层
试试用横板的独立开关来控制,不要用那个 "背景无限剑制解除"
你这个是用6号开关控制 :
技能开始时:打开6号开关,结束时关闭6号开关。
回复

使用道具 举报

梦石
0
星屑
878
在线时间
576 小时
注册时间
2010-6-26
回帖
709
发表于 2017-7-8 05:24:05 来自手机 | 显示全部楼层
对比下自带的范例技能改动吧,有类似的。那个宇宙背景转换的技能。

点评

已经解决了,十分感谢  发表于 2017-7-9 08:57
谢了,我去试试  发表于 2017-7-8 16:52

评分

参与人数 1星屑 +250 收起 理由
RaidenInfinity + 250 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
14802
在线时间
1014 小时
注册时间
2014-10-24
回帖
325
发表于 2017-7-8 10:27:46 | 显示全部楼层
请问,这一款横版脚本只能操作三个人么?

点评

好的谢谢,右上半即时的读条是哪个脚本啊?  发表于 2017-7-9 08:34
不是啊  发表于 2017-7-8 16:52
回复

使用道具 举报

梦石
2
星屑
3034
在线时间
398 小时
注册时间
2016-8-16
回帖
92

开拓者

 楼主| 发表于 2017-7-9 08:59:32 | 显示全部楼层
本帖最后由 卫宫白 于 2017-7-9 09:05 编辑
雾影药师 发表于 2017-7-8 10:27
请问,这一款横版脚本只能操作三个人么?

是这个脚本MOG_AyeshaATB显示
[pre lang="ruby"]#==============================================================================
# +++ MOG - Ayesha AT Gauge (ver 1.6) +++
#==============================================================================
# By Moghunter
# http://www.atelier-rgss.com
#==============================================================================
# Adiciona um medidor animado de AT, incluindo os ícones dos respectivos
# battlers.
#==============================================================================
# Arquivos necessários.
#
# ATB_Layout.png
# ATB_Enemy.png
# ATB_Actor.png
#
# Coloque as imagens na pasta
#
#            /Graphics/Ayesha_ATB/
#
#==============================================================================
# Opcional - Ícones específicos dos battlers.
#==============================================================================
# Nomeie os arquivos das seguinte forma.
#
# Actor_ + ID.png
# Enemy_ + ID.png
#
#==============================================================================
# Compatível com :
#
# - MOG ATB System (v 1.0)
# - Victor's Active Time Battle (1.05)
# - C Winter's Active Time Battle (1.62)
#
#==============================================================================
# Histórico
#==============================================================================
# v1.6 - Correção de não apresentar o ícone ao reviver o battler inimigo.
#==============================================================================
$imported = {} if $imported.nil?
$imported[:mog_ayesha_at_gauge] = true

module AYESHA_ATB_GAUGE
  #Definição do tipo de medidor. (Nota - A imagem original deve ser na vertical)
  # 0 - Vertical  /  1 - Horizontal
  GAUGE_TYPE = 1
  #Posição geral do medidor
  LAYOUT_POS = [560,0]
  #Posição do Ícones dos battlers.
  POINT_POS = [2,50]
  #Posição do Ícone quando o battler estiver ativo.
  CENTER_POS = [11,9]
  #Tamanho do medidor. [Altura e largura]
  GAUGE_SIZE = [170,31]
  #Posição Z do sprite.
  SPRITE_Z = 51
  #Definir a posição z do sprite baseado na altura.
  Z_FIX = false
end

#==============================================================================
# ■ Cache
#==============================================================================
module Cache

  #--------------------------------------------------------------------------
  # * Hud
  #--------------------------------------------------------------------------
  def self.ayesha_atb(filename)
      load_bitmap("Graphics/Ayesha_ATB/", filename)
  end

end

#==============================================================================
# ■ Game BattlerBase
#==============================================================================
class Game_BattlerBase
   attr_accessor :hidden
end

#==============================================================================
# ■ Game Temp
#==============================================================================
class Game_Temp
  attr_accessor :ay_gauge_data
  attr_accessor :battle_end
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------      
  alias mog_ayesha_gauge_initialize initialize
  def initialize
      @ay_gauge_data = [false,false,[0,0]] ; @battle_end = false
      mog_ayesha_gauge_initialize
  end
  
end

#==============================================================================
# ■ Game System
#==============================================================================
class Game_System
  attr_accessor :ay_gauge_type
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------      
  alias mog_ayesha_gauge_sys_initialize initialize
  def initialize
      @ay_gauge_type = AYESHA_ATB_GAUGE::GAUGE_TYPE
      mog_ayesha_gauge_sys_initialize
  end  
  
end

#===============================================================================
# ■ Spriteset_Battle
#===============================================================================
class Spriteset_Battle
  include AYESHA_ATB_GAUGE
  #--------------------------------------------------------------------------
  # ● Update Battle Start
  #--------------------------------------------------------------------------        
  alias mog_ayesha_atb_initialize initialize
  def initialize
      mog_ayesha_atb_initialize
      create_ayesha_atb
  end  
  
  #--------------------------------------------------------------------------
  # ● Dispose
  #--------------------------------------------------------------------------  
  alias mog_ayesha_atb_dispose dispose
  def dispose
      dispose_ayesha_atb
      mog_ayesha_atb_dispose      
  end
  
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------         
  alias mog_ayesha_atb_update update
  def update
      mog_ayesha_atb_update
      update_ayesha_atb
  end  

  #--------------------------------------------------------------------------
  # ● Create Ayesha ATB
  #--------------------------------------------------------------------------   
  def create_ayesha_atb
      return if @schala_atb != nil
      view = Z_FIX ? @viewport1 : nil
      @ayesha_atb = Ayesha_ATB_Gauge.new(view)
  end
  
  #--------------------------------------------------------------------------
  # ● Dispose ayesha ATB
  #--------------------------------------------------------------------------   
  def dispose_ayesha_atb
      return if @ayesha_atb == nil
      @ayesha_atb.dispose ; @ayesha_atb = nil
  end
  
  #--------------------------------------------------------------------------
  # ● Update Schala ATB
  #--------------------------------------------------------------------------   
  def update_ayesha_atb
      return if @ayesha_atb == nil      
      @ayesha_atb.update
  end
  
end

#==============================================================================
# ** Game Interpreter
#==============================================================================
class Game_Interpreter
  
#--------------------------------------------------------------------------
# ● Command_129
#--------------------------------------------------------------------------
alias mog_ayesha_gauge_command_129 command_129
def command_129
     mog_ayesha_gauge_command_129
     $game_temp.ay_gauge_data[1] = true if SceneManager.scene_is?(Scene_Battle)
end
  
#--------------------------------------------------------------------------
# ● Command 335
#--------------------------------------------------------------------------
alias mog_ayesha_at_command_335 command_335
def command_335
     mog_ayesha_at_command_335
     $game_temp.ay_gauge_data[1] = true if SceneManager.scene_is?(Scene_Battle)
end

end

#==============================================================================
# ■ Ayesha ATB Gauge
#==============================================================================
class Ayesha_ATB_Gauge
  include AYESHA_ATB_GAUGE
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------            
  def initialize(viewport = nil)
      $game_temp.ay_gauge_data[0] = false ; @faces = [] ; create_sprites(viewport)
  end

  #--------------------------------------------------------------------------
  # ● Create Sprites
  #--------------------------------------------------------------------------            
  def create_sprites(viewport = nil)
      return if $game_party.members.size == 0 or $game_troop.members.size == 0
      @layout = Sprite.new ; @layout.bitmap = Cache.ayesha_atb("ATB_Layout")
      @layout.z = SPRITE_Z ; @layout.opacity = 0 ; @layout.viewport = viewport
      $game_temp.ay_gauge_data[2] = [@layout.bitmap.width, @layout.height]
      @layout.x = LAYOUT_POS[0] + @layout.ox
      @layout.y = LAYOUT_POS[1] + @layout.oy
     (@layout.angle = 270 ; @layout.x += @layout.bitmap.width) if $game_system.ay_gauge_type == 1
      battlers.each do |i| @faces.push(Ayesha_Sprite_Icon.new(viewport,i)) end
  end   
      
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  def battlers
      return $game_troop.members + $game_party.battle_members
  end
  
  #--------------------------------------------------------------------------
  # ● Dispose
  #--------------------------------------------------------------------------
  def dispose
      @faces.each {|sprite| sprite.dipose_schala_point }
      return if @layout == nil
      @layout.bitmap.dispose ; @layout.dispose ; @layout = nil
  end
  
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------  
  def update
      return if @layout == nil
      @faces.each {|sprite| sprite.update_schala_point }
      @layout.opacity += !sprite_visible? ? - 10 : 10
      @layout.visible = !$game_message.visible
      refresh_ayesha_gauge if $game_temp.ay_gauge_data[1]
  end
  
  #--------------------------------------------------------------------------
  # ● Sprite Visible
  #--------------------------------------------------------------------------              
  def sprite_visible?
      return false if $game_temp.ay_gauge_data[0]
      return false if $game_message.visible
      return false if $game_temp.battle_end
      return true
  end  
  
  #--------------------------------------------------------------------------
  # ● Refresh Ayesha Gauge
  #--------------------------------------------------------------------------   
  def refresh_ayesha_gauge
      $game_temp.ay_gauge_data[1] = false ; dispose ; create_sprites(nil)
  end
  
end

#=============================================================================
# ■ Ayesha Sprite Icon
#==============================================================================
class Ayesha_Sprite_Icon < Sprite
  include AYESHA_ATB_GAUGE
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------              
  def initialize(viewport = nil,battler)
      super(viewport)
      @target = battler ; @gauge_size = GAUGE_SIZE[0]
      return if @target == nil
      create_bitmap
      self.ox = @cw / 2 ; self.oy = @ch / 2 ; self.x = 0 ; self.y = 0
      self.z = @sz ; self.opacity = 0 ; @pos_y = 0
      @gy = $game_temp.ay_gauge_data[2][0] - self.oy
      if $game_system.ay_gauge_type == 1
         @x2 = self.ox + LAYOUT_POS[0] + POINT_POS[0] - (@gauge_size + 5)
         @y2 = self.oy + LAYOUT_POS[1] + POINT_POS[1] - @gy
         @y2 += GAUGE_SIZE[1] if @target.is_a?(Game_Enemy)      
      else  
         @x2 = self.ox + LAYOUT_POS[0] + POINT_POS[0]
         @y2 = self.oy + LAYOUT_POS[1] + POINT_POS[1] + @gauge_size
         @x2 += GAUGE_SIZE[1] if @target.is_a?(Game_Enemy)
      end
      @x = 0 ; @y = 0 ; @cast_time = [false,0] ; @wait_fade = 2
      @center = [LAYOUT_POS[0] + self.ox + 11,LAYOUT_POS[1] + self.oy + 9]
      catb = ATB::MAX_AP rescue nil ; @ccwinter_atb = true if catb != nil  
      @atb = actor_at ; create_charge
  end

  #--------------------------------------------------------------------------
  # ● Create Charge
  #--------------------------------------------------------------------------              
  def create_charge
      @charge = Sprite.new ; @charge.bitmap = Cache.ayesha_atb("Cast") rescue nil
      update_charge
  end

  #--------------------------------------------------------------------------
  # ● Update Charge
  #--------------------------------------------------------------------------              
  def update_charge
      @charge.z = self.z ; @charge.x = self.x ; @charge.y = self.y
      @charge.opacity = self.opacity
  end   
  
  #--------------------------------------------------------------------------
  # ● Create Bitmap
  #--------------------------------------------------------------------------            
  def create_bitmap
      @face_index = [0,0] ; @s_bitmap = []
      b_nm = @target.is_a?(Game_Actor) ? "Actor" : "Enemy"
      b_id = @target.is_a?(Game_Actor) ? @target.id : @target.enemy_id
      @s_bitmap.push(Cache.ayesha_atb(b_nm.to_s + "_" + b_id.to_s)) rescue nil
      @s_bitmap.push(Cache.ayesha_atb(b_nm.to_s + "_ATB")) if @s_bitmap[0] == nil rescue nil
      @s_bitmap[0] = Bitmap.new(32,32) if @s_bitmap[0] == nil
      @s_bitmap.push(Cache.ayesha_atb(b_nm.to_s + "_" + b_id.to_s + "B")) rescue nil
      @cw = @s_bitmap[0].width ; @ch = @s_bitmap[0].height ; @sz = SPRITE_Z + 1
      self.bitmap = @s_bitmap[0] ; refresh_bitmap
  end

  #--------------------------------------------------------------------------
  # ● Refresh Bitmap
  #--------------------------------------------------------------------------            
  def refresh_bitmap
      @face_index[1] = @face_index[0] ; self.bitmap = @s_bitmap[@face_index[0]]
      self.zoom_x = 1.00
      @center = [LAYOUT_POS[0] + self.ox + CENTER_POS[0],LAYOUT_POS[1] + self.oy + CENTER_POS[1]]
      if self.bitmap == nil
         self.bitmap = @s_bitmap[0] ; self.zoom_x = 1.4
         @center = [LAYOUT_POS[0] + self.ox + CENTER_POS[0] + 6,LAYOUT_POS[1] + self.oy + CENTER_POS[1] + 7]
      end
  end
  
  #--------------------------------------------------------------------------
  # ● Dispose Schala Point
  #--------------------------------------------------------------------------            
  def dipose_schala_point
      return if self.bitmap == nil or self.bitmap.disposed?
      self.bitmap.dispose ; self.bitmap = nil ; dispose_charge
  end

  #--------------------------------------------------------------------------
  # ● Dispose Charge
  #--------------------------------------------------------------------------              
  def dispose_charge
      @charge.bitmap.dispose if @charge.bitmap != nil
      @charge.dispose
  end  
  
  #--------------------------------------------------------------------------
  # ● Update Schala Point
  #--------------------------------------------------------------------------              
  def update_schala_point
      return if self.bitmap == nil or self.bitmap.disposed? or !self.visible
      if can_update_atb?
         self.opacity += 10 unless @wait_fade > 0; update_atb
      else
         self.opacity -= 10 # ; check_all_dead? if self.opacity == 0
         self.zoom_x = 1.00 ; @cast_time[0] = false ; @wait_fade = 2
      end
      execute_move(0,self.x,@x) ; execute_move(1,self.y,@y)      
      self.zoom_y = self.zoom_x ; self.opacity = 0 if sprite_visible?
      update_charge ; @wait_fade -= 1 if @wait_fade > 0
  end
  
  #--------------------------------------------------------------------------
  # ● Sprite Visible
  #--------------------------------------------------------------------------              
  def sprite_visible?
      return true if $game_message.visible
      return true if $game_temp.battle_end
      return false
  end
  
  #--------------------------------------------------------------------------
  # ● Check All Dead?
  #--------------------------------------------------------------------------              
  def check_all_dead?
      return if !@target.is_a?(Game_Enemy)      
      self.visible = false ; $game_temp.ay_gauge_data[0] = true
      $game_troop.members.each {|b| $game_temp.ay_gauge_data[0] = false if !b.dead?}
  end
  
  #--------------------------------------------------------------------------
  # ● Can Update ATB
  #--------------------------------------------------------------------------  
  def can_update_atb?
      return false if @target == nil or @target.dead? or @target.hidden
      return false if $game_temp.ay_gauge_data[0]
      return true
  end
  
  #--------------------------------------------------------------------------
  # ● Update ATB
  #--------------------------------------------------------------------------               
  def update_atb
      update_atb_type
      if atb_max?
         @x = @center[0]; @y = @center[1] ; @face_index[0] = 1
      else
        if $game_system.ay_gauge_type == 1
           if actor_cast?
              @x = @x2 + gauge_cast - (@gauge_size * @atb / @atb_max) ; @y = @y2
           else   
              @x = @x2 + @gauge_size * @atb / @atb_max ; @y = @y2
           end  
           self.z = @sz + @x if Z_FIX
        else
           if actor_cast?
              @y = @y2 - gauge_cast + (@gauge_size * @atb / @atb_max) ; @x = @x2
           else   
              @y = @y2 - @gauge_size * @atb / @atb_max ; @x = @x2
           end
           self.z = @sz + (@gauge_size - @y) if Z_FIX
        end   
        @face_index[0] = 0 ; self.zoom_x = 1.00
      end      
      refresh_bitmap if @face_index[0] != @face_index[1]
  end

  #--------------------------------------------------------------------------
  # ● ATB Max
  #--------------------------------------------------------------------------                  
  def atb_max?
      if @atb.abs >= @atb_max.abs
         if $imported[:mog_atb_system]
            return true if BattleManager.battler_in_turn?(@target)
         else
            return true
         end
      end
      return true if @cast_time[1] > 0
      return false
  end
   
  #--------------------------------------------------------------------------
  # ● Update ATB Type
  #--------------------------------------------------------------------------                  
  def update_atb_type
      if actor_cast?
         @atb_max = actor_max_cast ; @atb = actor_cast ; @cast_time = [true,0]
         @charge.visible = true
      else
         @atb_max = actor_max_at ; @atb = actor_at
         @cast_time[1] = cast_wait_time if @cast_time[0] ; @cast_time[1] -= 1 if @cast_time[1] > 0
         @cast_time[0] = false ; @charge.visible = false unless @cast_time[1] > 55
      end
      @atb_max = 1 if @atb_max == 0  
  end

  #--------------------------------------------------------------------------
  # ● Execute Move
  #--------------------------------------------------------------------------      
  def execute_move(type,cp,np)
      sp = 5 + ((cp - np).abs / 20)
      if cp > np
         cp -= sp ; cp = np if cp < np
      elsif cp < np
         cp += sp ; cp = np if cp > np
      end     
      self.x = cp if type == 0 ; self.y = cp if type == 1
  end   

  #--------------------------------------------------------------------------
  # * AT
  #--------------------------------------------------------------------------  
  def actor_at
      return @target.atb if $imported[:mog_atb_system]
      return @target.atb if $imported[:ve_active_time_battle]
      return @target.catb_value if $imported["YSA-CATB"]
      return @target.ap if @ccwinter_atb != nil
      return 0
  end

  #--------------------------------------------------------------------------
  # * Max AT
  #--------------------------------------------------------------------------  
  def actor_max_at
      return @target.atb_max if $imported[:mog_atb_system]
      return @target.max_atb if $imported[:ve_active_time_battle]
      return @target.max_atb if $imported["YSA-CATB"]
      return ATB::MAX_AP if @ccwinter_atb != nil
      return 1
  end

  #--------------------------------------------------------------------------
  # ● Actor Cast
  #--------------------------------------------------------------------------            
  def actor_cast
      return @target.atb_cast[1] rescue nil if $imported[:mog_atb_system]
      return -@target.atb if $imported[:ve_active_time_battle]
      return @target.chant_count rescue 0 if @ccwinter_atb != nil
      return 0
  end

  #--------------------------------------------------------------------------
  # ● Actor Max Cast
  #--------------------------------------------------------------------------            
  def actor_max_cast
      if $imported[:mog_atb_system]
         return @target.atb_cast[2] if @target.atb_cast[2] != 0
         return @target.atb_cast[0].speed.abs
      end   
      return @target.max_atb if $imported[:ve_active_time_battle]
      return -@target.max_chant_count rescue 1 if @ccwinter_atb != nil
      return 1
  end

  #--------------------------------------------------------------------------
  # ● Actor Max Cast
  #--------------------------------------------------------------------------            
  def gauge_cast
      return @gauge_size if $imported[:mog_atb_system]
      return 0
  end
  
  #--------------------------------------------------------------------------
  # ● Actor Cast?
  #--------------------------------------------------------------------------            
  def actor_cast?
      if $imported[:mog_atb_system]
         return true if !@target.atb_cast.empty? rescue false
      end   
      if $imported[:ve_active_time_battle]
         return true if @target.cast_action? rescue false
      end      
      if @ccwinter_atb
         return true if @target.chanting? rescue false
      end
      return false
  end   
  
  #--------------------------------------------------------------------------
  # ● Cast Wait Time
  #--------------------------------------------------------------------------            
  def cast_wait_time
      return 10 if @ccwinter_atb
      return 60
  end
  
end

#==============================================================================
# ■ Game_Battler
#==============================================================================
class Game_Battler < Game_BattlerBase     
   attr_accessor :chant_count
   attr_accessor :max_chant_count
end[/pre]
至于需要的图片我发在这里。人物头像的格式我也发在这里。如果需要你也可以自己选择读条的图片,不过名字还是要改成ATB_Layout,不要忘了
ATB_Layout.png
Cast.png
Actor_14.png
Actor_14B.png
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部