Accueil du SiteAccueil du Site  AccueilAccueil  Dernières imagesDernières images  RechercherRechercher  ConnexionConnexion  S'enregistrerS'enregistrer  



-50%
Le deal à ne pas rater :
-50% Baskets Nike Air Huarache Runner
69.99 € 139.99 €
Voir le deal

Partagez
 

 [XP] Scene Battle

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Kakashi18
Chevalier Mage (niveau 1)
Chevalier Mage (niveau 1)
Kakashi18

Masculin
Messages postés : 392
Date d'inscription : 15/05/2013
Jauge LPC :
[XP] Scene Battle 891527140024 / 10024 / 100[XP] Scene Battle 8915271400

[XP] Scene Battle Membre10
[XP] Scene Battle Collec10


[XP] Scene Battle Empty
MessageSujet: [XP] Scene Battle   [XP] Scene Battle EmptyJeu 15 Aoû 2013 - 23:43

Salut à tous !

Je cherche qqun qui roxe du poney en ruby pcq j'ai un problème avec mes Scene Battle et ça va pas être très simple. J'ai modifié, ajouter des morceaux bref, beaucoup de trucs accumulés qui fait que pour trouver d'où vient le problème ça va être galère.

En gros les modifs c'est sur l'apparence, l'ajout de catégories pour les attaques magiques et celle qui a fait apparaître le bug, un morceau qui empêche les attaques normales si le statut 68 est infligé.

Voici les 4 scripts Scene_Battle et le message d'erreur qui apparait quand je fais Echap au moment du choix de la catégorie (je sais pas si c'est clair), j'espère vraiment que qqun pourra m'aider Smile


Scene_Battle1
Code:
#==============================================================================
# ■ Scene_Battle (分割定義 1)
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main
    #==========================================================================
# ¦ Le tableau de choix
#-------------------------------------------------------------------------------------------------------------------------------------
# ?*Pour ajouter: ajoutez une virgule et marquez ente " " ce que vous voulez afficher pour les
# 2 ligne suivante et ajouter à la ligne 33 après n[x], une nouvelle virgule et un nouveau n[x+1]
# ?**Pour enlever: vous n'avez qu'à enlever les dernière valeur de chaque ligne (invocation, n[2]...)
#==========================================================================
n=["Ninjutsu","Genjutsu","Taijutsu"]# Le nom des options
@mot_clef=["Ninjutsu","Genjutsu","Taijutsu"] # les mot clef a mettre dans la description de la compétence

@command_competence = Window_Command.new(160, [ n[0],n[1], n[2] ]) #affiche commande
@command_competence.y = 160 # position vertical
@command_competence.opacity = 160
@command_competence.active = false
@command_competence.visible = false
@command_competence.z=1000
#===========================================================================

    # NEW - David
    #$battle_end = false
    @lvup_window = []
    @show_dummies = true # Show dummy windows or not?

    # 戦闘用の各種一時データを初期化
    $game_temp.in_battle = true
    $game_temp.battle_turn = 0
    $game_temp.battle_event_flags.clear
    $game_temp.battle_abort = false
    $game_temp.battle_main_phase = false
    $game_temp.battleback_name = $game_map.battleback_name
    $game_temp.forcing_battler = nil
    # バトルイベント用インタプリタを初期化
    $game_system.battle_interpreter.setup(nil, 0)
    # トループを準備
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    # アクターコマンドウィンドウを作成
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
    @actor_command_window.y = 160
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # その他のウィンドウを作成
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    # スプライトセットを作成
    @spriteset = Spriteset_Battle.new
    # ウェイトカウントを初期化
    @wait_count = 0
    # トランジション実行
    if $data_system.battle_transition == ""
      Graphics.transition(20)
    else
      Graphics.transition(40, "Graphics/Transitions/" +
        $data_system.battle_transition)
    end
    # プレバトルフェーズ開始
    start_phase1
    # メインループ
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレーム更新
      update
      # 画面が切り替わったらループを中断
      if $scene != self
        break
      end
    end
    # マップをリフレッシュ
    $game_map.refresh
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @actor_command_window.dispose
    @party_command_window.dispose
    @help_window.dispose
    @status_window.dispose
    @message_window.dispose
    
    # NEW - David
    @lvup_window = nil
    @level_up = nil
    @ch_stats = nil
    @ch_compare_stats = nil

    if @skill_window != nil
      @skill_window.dispose
    end
    if @item_window != nil
      @item_window.dispose
    end
    if @result_window != nil
      @result_window.dispose
    end
    # スプライトセットを解放
    
    # NEW - David
    #@spriteset.dispose
    
    # タイトル画面に切り替え中の場合
    if $scene.is_a?(Scene_Title)
      # 画面をフェードアウト
      Graphics.transition
      Graphics.freeze
    end
    # 戦闘テストからゲームオーバー画面以外に切り替え中の場合
    if $BTEST and not $scene.is_a?(Scene_Gameover)
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # ● 勝敗判定
  #--------------------------------------------------------------------------
  def judge
    # 全滅判定が真、またはパーティ人数が 0 人の場合
    if $game_party.all_dead? or $game_party.actors.size == 0
      # 敗北可能の場合
      if $game_temp.battle_can_lose
        # バトル開始前の BGM に戻す
        $game_system.bgm_play($game_temp.map_bgm)
        # バトル終了
        battle_end(2)
        # true を返す
        return true
      end
      # ゲームオーバーフラグをセット
      $game_temp.gameover = true
      # true を返す
      return true
    end
    # エネミーが 1 体でも存在すれば false を返す
    for enemy in $game_troop.enemies
      if enemy.exist?
        return false
      end
    end
    # アフターバトルフェーズ開始 (勝利)
    start_phase5
    # true を返す
    return true
  end
  #--------------------------------------------------------------------------
  # ● バトル終了
  #     result : 結果 (0:勝利 1:敗北 2:逃走)
  #--------------------------------------------------------------------------
  def battle_end(result)
    # 戦闘中フラグをクリア
    $game_temp.in_battle = false
    # パーティ全員のアクションをクリア
    $game_party.clear_actions
    # バトル用ステートを解除
    for actor in $game_party.actors
      actor.remove_states_battle
    end
    # エネミーをクリア
    $game_troop.enemies.clear
    # バトル コールバックを呼ぶ
    if $game_temp.battle_proc != nil
      $game_temp.battle_proc.call(result)
      $game_temp.battle_proc = nil
    end
    # マップ画面に切り替え
     $scene = Scene_Map.new
  
    # NEW - David
    @status_window.visible = false
    @spriteset.dispose
    Graphics.transition
    if result == 0
      display_lv_up(@exp, @gold, @treasures)
      loop do
        Graphics.update
        Input.update
        if Input.trigger?(Input::C)
          break
        end
      end
      trash_lv_up
    end

  end
  #--------------------------------------------------------------------------
  # ● バトルイベントのセットアップ
  #--------------------------------------------------------------------------
  def setup_battle_event
    # バトルイベント実行中の場合
    if $game_system.battle_interpreter.running?
      return
    end
    # バトルイベントの全ページを検索
    for index in 0...$data_troops[@troop_id].pages.size
      # イベントページを取得
      page = $data_troops[@troop_id].pages[index]
      # イベント条件を c で参照可能に
      c = page.condition
      # 何も条件が指定されていない場合は次のページへ
      unless c.turn_valid or c.enemy_valid or
             c.actor_valid or c.switch_valid
        next
      end
      # 実行済みの場合は次のページへ
      if $game_temp.battle_event_flags[index]
        next
      end
      # ターン 条件確認
      if c.turn_valid
        n = $game_temp.battle_turn
        a = c.turn_a
        b = c.turn_b
        if (b == 0 and n != a) or
           (b > 0 and (n < 1 or n < a or n % b != a % b))
          next
        end
      end
      # エネミー 条件確認
      if c.enemy_valid
        enemy = $game_troop.enemies[c.enemy_index]
        if enemy == nil or enemy.hp * 100.0 / enemy.maxhp > c.enemy_hp
          next
        end
      end
      # アクター 条件確認
      if c.actor_valid
        actor = $game_actors[c.actor_id]
        if actor == nil or actor.hp * 100.0 / actor.maxhp > c.actor_hp
          next
        end
      end
      # スイッチ 条件確認
      if c.switch_valid
        if $game_switches[c.switch_id] == false
          next
        end
      end
      # イベントをセットアップ
      $game_system.battle_interpreter.setup(page.list, 0)
      # このページのスパンが [バトル] か [ターン] の場合
      if page.span <= 1
        # 実行済みフラグをセット
        $game_temp.battle_event_flags[index] = true
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # バトルイベント実行中の場合
    if $game_system.battle_interpreter.running?
      # インタプリタを更新
      $game_system.battle_interpreter.update
      # アクションを強制されているバトラーが存在しない場合
      if $game_temp.forcing_battler == nil
        # バトルイベントの実行が終わった場合
        unless $game_system.battle_interpreter.running?
          # 戦闘継続の場合、バトルイベントのセットアップを再実行
          unless judge
            setup_battle_event
          end
        end
        # アフターバトルフェーズでなければ
        if @phase != 5
          # ステータスウィンドウをリフレッシュ
          @status_window.refresh
        end
      end
    end
    # システム (タイマー)、画面を更新
    $game_system.update
    $game_screen.update
    # タイマーが 0 になった場合
    if $game_system.timer_working and $game_system.timer == 0
      # バトル中断
      $game_temp.battle_abort = true
    end
    # ウィンドウを更新
    @help_window.update
    @party_command_window.update
    @actor_command_window.update
    @status_window.update
    @message_window.update
    # スプライトセットを更新
    @spriteset.update
    # トランジション処理中の場合
    if $game_temp.transition_processing
      # トランジション処理中フラグをクリア
      $game_temp.transition_processing = false
      # トランジション実行
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    # メッセージウィンドウ表示中の場合
    if $game_temp.message_window_showing
      return
    end
    # エフェクト表示中の場合
    if @spriteset.effect?
      return
    end
    # ゲームオーバーの場合
    if $game_temp.gameover
      # ゲームオーバー画面に切り替え
      $scene = Scene_Gameover.new
      return
    end
    # タイトル画面に戻す場合
    if $game_temp.to_title
      # タイトル画面に切り替え
      $scene = Scene_Title.new
      return
    end
    # バトル中断の場合
    if $game_temp.battle_abort
      # バトル開始前の BGM に戻す
      $game_system.bgm_play($game_temp.map_bgm)
      # バトル終了
      battle_end(1)
      return
    end
    # ウェイト中の場合
    if @wait_count > 0
      # ウェイトカウントを減らす
      @wait_count -= 1
      return
    end
    # アクションを強制されているバトラーが存在せず、
    # かつバトルイベントが実行中の場合
    if $game_temp.forcing_battler == nil and
       $game_system.battle_interpreter.running?
      return
    end
    # フェーズによって分岐
    case @phase
    when 1  # プレバトルフェーズ
      update_phase1
    when 2  # パーティコマンドフェーズ
      update_phase2
    when 3  # アクターコマンドフェーズ
      update_phase3
    when 4  # メインフェーズ
      update_phase4
    when 5  # アフターバトルフェーズ
      update_phase5
    end
  end
end
Scene_Battle2
Code:
#==============================================================================
# ■ Scene_Battle (分割定義 2)
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● プレバトルフェーズ開始
  #--------------------------------------------------------------------------
  def start_phase1
    # フェーズ 1 に移行
    @phase = 1
    # パーティ全員のアクションをクリア
    $game_party.clear_actions
    # バトルイベントをセットアップ
    setup_battle_event
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (プレバトルフェーズ)
  #--------------------------------------------------------------------------
  def update_phase1
    # 勝敗判定
    if judge
      # 勝利または敗北の場合 : メソッド終了
      return
    end
    # パーティコマンドフェーズ開始
    start_phase2
  end
  #--------------------------------------------------------------------------
  # ● パーティコマンドフェーズ開始
  #--------------------------------------------------------------------------
  def start_phase2
    # フェーズ 2 に移行
    @phase = 2
    # アクターを非選択状態に設定
    @actor_index = -1
    @active_battler = nil
    # パーティコマンドウィンドウを有効化
    @party_command_window.active = true
    @party_command_window.visible = true
    # アクターコマンドウィンドウを無効化
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # メインフェーズフラグをクリア
    $game_temp.battle_main_phase = false
    # パーティ全員のアクションをクリア
    $game_party.clear_actions
    # コマンド入力不可能な場合
    unless $game_party.inputable?
      # メインフェーズ開始
      start_phase4
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (パーティコマンドフェーズ)
  #--------------------------------------------------------------------------
  def update_phase2
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # パーティコマンドウィンドウのカーソル位置で分岐
      case @party_command_window.index
      when 0  # 戦う
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アクターコマンドフェーズ開始
        start_phase3
      when 1  # 逃げる
        # 逃走可能ではない場合
        if $game_temp.battle_can_escape == false
          # ブザー SE を演奏
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # 逃走処理
        update_phase2_escape
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (パーティコマンドフェーズ : 逃げる)
  #--------------------------------------------------------------------------
  def update_phase2_escape
    # エネミーの素早さ平均値を計算
    enemies_agi = 0
    enemies_number = 0
    for enemy in $game_troop.enemies
      if enemy.exist?
        enemies_agi += enemy.agi
        enemies_number += 1
      end
    end
    if enemies_number > 0
      enemies_agi /= enemies_number
    end
    # アクターの素早さ平均値を計算
    actors_agi = 0
    actors_number = 0
    for actor in $game_party.actors
      if actor.exist?
        actors_agi += actor.agi
        actors_number += 1
      end
    end
    if actors_number > 0
      actors_agi /= actors_number
    end
    # 逃走成功判定
    success = rand(100) < 50 * actors_agi / enemies_agi
    # 逃走成功の場合
    if success
      # 逃走 SE を演奏
      $game_system.se_play($data_system.escape_se)
      # バトル開始前の BGM に戻す
      $game_system.bgm_play($game_temp.map_bgm)
      # バトル終了
      battle_end(1)
    # 逃走失敗の場合
    else
      # パーティ全員のアクションをクリア
      $game_party.clear_actions
      # メインフェーズ開始
      start_phase4
    end
  end
  #--------------------------------------------------------------------------
  # ● アフターバトルフェーズ開始
  #--------------------------------------------------------------------------
  def start_phase5
    # フェーズ 5 に移行
    @phase = 5
    # バトル終了 ME を演奏
    $game_system.me_play($game_system.battle_end_me)
    # バトル開始前の BGM に戻す
    $game_system.bgm_play($game_temp.map_bgm)
    # EXP、ゴールド、トレジャーを初期化
    exp = 0
    gold = 0
    treasures = []
    # ループ
    for enemy in $game_troop.enemies
      # エネミーが隠れ状態でない場合
      unless enemy.hidden
        # Ajout pour la liste des monstres de Krazplay
        $game_variables[4000 + enemy.id] += 1
        # 獲得 EXP、ゴールドを追加
        exp += enemy.exp
        gold += enemy.gold
        # トレジャー出現判定
        if rand(100) < enemy.treasure_prob
          if enemy.item_id > 0
            treasures.push($data_items[enemy.item_id])
          end
          if enemy.weapon_id > 0
            treasures.push($data_weapons[enemy.weapon_id])
          end
          if enemy.armor_id > 0
            treasures.push($data_armors[enemy.armor_id])
          end
        end
      end
    end
    # トレジャーの数を 6 個までに限定
    treasures = treasures[0..5]

    # NEW - David
    @treasures = treasures
    @exp  = exp
    @gold = gold

    
    # NEW - David
#    for i in 0...$game_party.actors.size
#      actor = $game_party.actors[i]
#      if actor.cant_get_exp? == false
#        last_level = actor.level
#        actor.exp += exp
#        if actor.level > last_level
#          @status_window.level_up(i)
          
          # NEW - David
#          @level_up[i] = true
#          @are_level_ups = true
          
#        end
#      end
#    end
    # ゴールド獲得
#    $game_party.gain_gold(gold)

    # トレジャー獲得
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    # バトルリザルトウィンドウを作成
    
    # NEW - David
    #@result_window = Window_BattleResult.new(exp, gold, treasures)
    
    # ウェイトカウントを設定
    @phase5_wait_count = 10
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アフターバトルフェーズ)
  #--------------------------------------------------------------------------
  def update_phase5
    # ウェイトカウントが 0 より大きい場合
    if @phase5_wait_count > 0
      # ウェイトカウントを減らす
      @phase5_wait_count -= 1
      # ウェイトカウントが 0 になった場合
      if @phase5_wait_count == 0
        # リザルトウィンドウを表示
        
        # NEW - David
        #@result_window.visible = true
        # メインフェーズフラグをクリア
        $game_temp.battle_main_phase = false
        # ステータスウィンドウをリフレッシュ
        #@status_window.refresh
        
      end
      return
    end

    # NEW - David
#    if Input.trigger?(Input::C)
      battle_end(0)
#    end

  end
end
Scene_Battle3
Code:
#==============================================================================
# ¦ Scene_Battle (???? 3)
#------------------------------------------------------------------------------
#==============================================================================

class Scene_Battle
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def start_phase3
# ???? 3 ???
@phase = 3
# ?????????????
@actor_index = -1
@active_battler = nil
# ??????????????
phase3_next_actor
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def phase3_next_actor
$option2=false
# ???
begin
# ???????????? OFF
if @active_battler != nil
@active_battler.blink = false
end
# ??????????
if @actor_index == $game_party.actors.size-1
# ?????????
start_phase4
return
end
# ???????????????
@actor_index += 1
      @active_battler = $game_party.actors[@actor_index]
      @active_battler.blink = true
    # Once more if actor refuses command input
    end until @active_battler.inputable?
    # Set up actor command window
    phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def phase3_prior_actor
# ???
begin
# ???????????? OFF
if @active_battler != nil
@active_battler.blink = false
end
# ??????????
if @actor_index == 0
# ??????????????
start_phase2
return
end
# ??????????????
@actor_index -= 1
      @active_battler = $game_party.actors[@actor_index]
      @active_battler.blink = true
    # Once more if actor refuses command input
    end until @active_battler.inputable?
    # Set up actor command window
    phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ? ????????????????????
#--------------------------------------------------------------------------
def phase3_setup_command_window
# ?????????????????
@party_command_window.active = false
@party_command_window.visible = false
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
# ???????????????????
@actor_command_window.x = @actor_index * 160
# Set index to 0
    @actor_command_window.index = 0
end
#--------------------------------------------------------------------------
# ? ?????? (????????????)
#--------------------------------------------------------------------------
def update_phase3
if @command_competence.visible
update_command2
else
# ?????????????
if @enemy_arrow != nil
update_phase3_enemy_select
# ?????????????
elsif @actor_arrow != nil
update_phase3_actor_select
# ??????????????
elsif @skill_window != nil
update_phase3_skill_select
# ???????????????
elsif @item_window != nil
update_phase3_item_select
# ???????????????????
elsif @actor_command_window.active
update_phase3_basic_command
end
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_command2
@command_competence.update
@actor_command_window.active=false
@command_competence.active=true
if Input.trigger?(Input::C)
$option_magie=@mot_clef[@command_competence.index]
@command_competence.visible=false
@actor_command_window.visible=false
start_skill_select
end
if Input.trigger?(Input::B)
@command_competence.visible=false
@actor_command_window.active=true
if $game_party.actors[@actor_index].state?(68)
        @actor_command_window.disable_item(0)
      else
        @actor_command_window.enable_item(0)
      end
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_phase3_basic_command
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????????
phase3_prior_actor
return
end
# If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by actor command window cursor position
      case @actor_command_window.index
      when 0  # attack
        if @active_battler.state?(68)
          $game_system.se_play($data_system.buzzer_se)
        else
          # Play decision SE
          $game_system.se_play($data_system.decision_se)
          # Set action
          @active_battler.current_action.kind = 0
          @active_battler.current_action.basic = 0
          # Start enemy selection
          start_enemy_select
   end
    when 1 # ???
@command_competence.visible=true
if @actor_index * 160+100>480
@command_competence.x = @actor_index * 160-100
else
@command_competence.x = @actor_index * 160+100
end
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.kind = 1
# update_phase3_basic_command
# ?????????
when 2 # ??
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
# ??????????????
phase3_next_actor
when 3 # ????
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.kind = 2
# ??????????
start_item_select
end
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ?????)
#--------------------------------------------------------------------------
def update_phase3_skill_select
# ????????????????
@skill_window.visible = true
# ???????????
@skill_window.update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ?????????
end_skill_select
return
end
# C ??????????
if Input.trigger?(Input::C)
# ????????????????????????
@skill = @skill_window.skill
# ????????
if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.skill_id = @skill.id
# ?????????????????
@skill_window.visible = false
# ???????????
if @skill.scope == 1
# ??????????
start_enemy_select
# ????????????
elsif @skill.scope == 3 or @skill.scope == 5
# ??????????
start_actor_select
# ?????????????
else
# ?????????
end_skill_select
# ??????????????
phase3_next_actor
end
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_phase3_item_select
# ?????????????????
@item_window.visible = true
# ????????????
@item_window.update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????
end_item_select
return
end
# C ??????????
if Input.trigger?(Input::C)
# ?????????????????????????
@item = @item_window.item
# ????????
unless $game_party.item_can_use?(@item.id)
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.item_id = @item.id
# ??????????????????
@item_window.visible = false
# ???????????
if @item.scope == 1
# ??????????
start_enemy_select
# ????????????
elsif @item.scope == 3 or @item.scope == 5
# ??????????
start_actor_select
# ?????????????
else
# ??????????
end_item_select
# ??????????????
phase3_next_actor
end
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_phase3_enemy_select
# ??????????
@enemy_arrow.update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????
end_enemy_select
return
end
# C ??????????
if Input.trigger?(Input::C)
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.target_index = @enemy_arrow.index
# ??????????
end_enemy_select
# ??????????????
if @skill_window != nil
# ?????????
end_skill_select
end
# ???????????????
if @item_window != nil
# ??????????
end_item_select
end
# ??????????????
phase3_next_actor
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_phase3_actor_select
# ??????????
@actor_arrow.update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????
end_actor_select
return
end
# C ??????????
if Input.trigger?(Input::C)
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.target_index = @actor_arrow.index
# ??????????
end_actor_select
# ??????????????
if @skill_window != nil
# ?????????
end_skill_select
end
# ???????????????
if @item_window != nil
# ??????????
end_item_select
end
# ??????????????
phase3_next_actor
end
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def start_enemy_select
# ??????????
@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)
# ?????????????
@enemy_arrow.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def end_enemy_select
# ??????????
@enemy_arrow.dispose
@enemy_arrow = nil
# ????? [??] ???
if @actor_command_window.index == 0
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
# ???????????
@help_window.visible = false
end
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def start_actor_select
# ??????????
@actor_arrow = Arrow_Actor.new(@spriteset.viewport2)
@actor_arrow.index = @actor_index
# ?????????????
@actor_arrow.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def end_actor_select
# ??????????
@actor_arrow.dispose
@actor_arrow = nil
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def start_skill_select
# ???????????
@skill_window = Window_Skill.new(@active_battler)
# ?????????????
@skill_window.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def end_skill_select
# ???????????
@skill_window.dispose
@skill_window = nil
# ???????????
@help_window.visible = false
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def start_item_select
# ????????????
@item_window = Window_Item.new
# ?????????????
@item_window.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def end_item_select
# ????????????
@item_window.dispose
@item_window = nil
# ???????????
@help_window.visible = false
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
end
end
Revenir en haut Aller en bas
Kakashi18
Chevalier Mage (niveau 1)
Chevalier Mage (niveau 1)
Kakashi18

Masculin
Messages postés : 392
Date d'inscription : 15/05/2013
Jauge LPC :
[XP] Scene Battle 891527140024 / 10024 / 100[XP] Scene Battle 8915271400

[XP] Scene Battle Membre10
[XP] Scene Battle Collec10


[XP] Scene Battle Empty
MessageSujet: Re: [XP] Scene Battle   [XP] Scene Battle EmptyJeu 15 Aoû 2013 - 23:45

Scene_Battle4
Code:
#==============================================================================
# ■ Scene_Battle (分割定義 4)
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● メインフェーズ開始
  #--------------------------------------------------------------------------
  def start_phase4
    # フェーズ 4 に移行
    @phase = 4
    # ターン数カウント
    $game_temp.battle_turn += 1
    # バトルイベントの全ページを検索
    for index in 0...$data_troops[@troop_id].pages.size
      # イベントページを取得
      page = $data_troops[@troop_id].pages[index]
      # このページのスパンが [ターン] の場合
      if page.span == 1
        # 実行済みフラグをクリア
        $game_temp.battle_event_flags[index] = false
      end
    end
    # アクターを非選択状態に設定
    @actor_index = -1
    @active_battler = nil
    # パーティコマンドウィンドウを有効化
    @party_command_window.active = false
    @party_command_window.visible = false
    # アクターコマンドウィンドウを無効化
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # メインフェーズフラグをセット
    $game_temp.battle_main_phase = true
    # エネミーアクション作成
    for enemy in $game_troop.enemies
      enemy.make_action
    end
    # 行動順序作成
    make_action_orders
    # ステップ 1 に移行
    @phase4_step = 1
  end
  #--------------------------------------------------------------------------
  # ● 行動順序作成
  #--------------------------------------------------------------------------
  def make_action_orders
    # 配列 @action_battlers を初期化
    @action_battlers = []
    # エネミーを配列 @action_battlers に追加
    for enemy in $game_troop.enemies
      @action_battlers.push(enemy)
    end
    # アクターを配列 @action_battlers に追加
    for actor in $game_party.actors
      @action_battlers.push(actor)
    end
    # 全員のアクションスピードを決定
    for battler in @action_battlers
      battler.make_action_speed
    end
    # アクションスピードの大きい順に並び替え
    @action_battlers.sort! {|a,b|
      b.current_action.speed - a.current_action.speed }
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ)
  #--------------------------------------------------------------------------
  def update_phase4
    case @phase4_step
    when 1
      update_phase4_step1
    when 2
      update_phase4_step2
    when 3
      update_phase4_step3
    when 4
      update_phase4_step4
    when 5
      update_phase4_step5
    when 6
      update_phase4_step6
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備)
  #--------------------------------------------------------------------------
  def update_phase4_step1
    # ヘルプウィンドウを隠す
    @help_window.visible = false
    # 勝敗判定
    if judge
      # 勝利または敗北の場合 : メソッド終了
      return
    end
    # アクションを強制されているバトラーが存在しない場合
    if $game_temp.forcing_battler == nil
      # バトルイベントをセットアップ
      setup_battle_event
      # バトルイベント実行中の場合
      if $game_system.battle_interpreter.running?
        return
      end
    end
    # アクションを強制されているバトラーが存在する場合
    if $game_temp.forcing_battler != nil
      # 先頭に追加または移動
      @action_battlers.delete($game_temp.forcing_battler)
      @action_battlers.unshift($game_temp.forcing_battler)
    end
    # 未行動バトラーが存在しない場合 (全員行動した)
    if @action_battlers.size == 0
      # パーティコマンドフェーズ開始
      start_phase2
      return
    end
    # アニメーション ID およびコモンイベント ID を初期化
    @animation1_id = 0
    @animation2_id = 0
    @common_event_id = 0
    # 未行動バトラー配列の先頭からシフト
    @active_battler = @action_battlers.shift
    # すでに戦闘から外されている場合
    if @active_battler.index == nil
      return
    end
    # スリップダメージ
    if @active_battler.hp > 0 and @active_battler.slip_damage?
      @active_battler.slip_damage_effect
      @active_battler.damage_pop = true
    end
    # ステート自然解除
    @active_battler.remove_states_auto
    # ステータスウィンドウをリフレッシュ
    @status_window.refresh
    # ステップ 2 に移行
    @phase4_step = 2
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  #--------------------------------------------------------------------------
  def update_phase4_step2
    # 強制アクションでなければ
    unless @active_battler.current_action.forcing
      # 制約が [敵を通常攻撃する] か [味方を通常攻撃する] の場合
      if @active_battler.restriction == 2 or @active_battler.restriction == 3
        # アクションに攻撃を設定
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 0
      end
      # 制約が [行動できない] の場合
      if @active_battler.restriction == 4
        # アクション強制対象のバトラーをクリア
        $game_temp.forcing_battler = nil
        # ステップ 1 に移行
        @phase4_step = 1
        return
      end
    end
    # 対象バトラーをクリア
    @target_battlers = []
    # アクションの種別で分岐
    case @active_battler.current_action.kind
    when 0  # 基本
      make_basic_action_result
    when 1  # スキル
      make_skill_action_result
    when 2  # アイテム
      make_item_action_result
    end
    # ステップ 3 に移行
    if @phase4_step == 2
      @phase4_step = 3
    end
  end
  #--------------------------------------------------------------------------
  # ● 基本アクション 結果作成
  #--------------------------------------------------------------------------
  def make_basic_action_result
    # 攻撃の場合
    if @active_battler.current_action.basic == 0
      # アニメーション ID を設定
      @animation1_id = @active_battler.animation1_id
      @animation2_id = @active_battler.animation2_id
      # 行動側バトラーがエネミーの場合
      if @active_battler.is_a?(Game_Enemy)
        if @active_battler.restriction == 3
          target = $game_troop.random_target_enemy
        elsif @active_battler.restriction == 2
          target = $game_party.random_target_actor
        else
          index = @active_battler.current_action.target_index
          target = $game_party.smooth_target_actor(index)
        end
      end
      # 行動側バトラーがアクターの場合
      if @active_battler.is_a?(Game_Actor)
        if @active_battler.restriction == 3
          target = $game_party.random_target_actor
        elsif @active_battler.restriction == 2
          target = $game_troop.random_target_enemy
        else
          index = @active_battler.current_action.target_index
          target = $game_troop.smooth_target_enemy(index)
        end
      end
      # 対象側バトラーの配列を設定
      @target_battlers = [target]
      # 通常攻撃の効果を適用
      for target in @target_battlers
        target.attack_effect(@active_battler)
      end
      return
    end
    # 防御の場合
    if @active_battler.current_action.basic == 1
      # ヘルプウィンドウに "防御" を表示
      @help_window.set_text($data_system.words.guard, 1)
      return
    end
    # 逃げるの場合
    if @active_battler.is_a?(Game_Enemy) and
       @active_battler.current_action.basic == 2
      # ヘルプウィンドウに "逃げる" を表示
      @help_window.set_text("Escape", 1)
      # 逃げる
      @active_battler.escape
      return
    end
    # 何もしないの場合
    if @active_battler.current_action.basic == 3
      # アクション強制対象のバトラーをクリア
      $game_temp.forcing_battler = nil
      # ステップ 1 に移行
      @phase4_step = 1
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● スキルまたはアイテムの対象側バトラー設定
  #     scope : スキルまたはアイテムの効果範囲
  #--------------------------------------------------------------------------
  def set_target_battlers(scope)
    # 行動側バトラーがエネミーの場合
    if @active_battler.is_a?(Game_Enemy)
      # 効果範囲で分岐
      case scope
      when 1  # 敵単体
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_party.smooth_target_actor(index))
      when 2  # 敵全体
        for actor in $game_party.actors
          if actor.exist?
            @target_battlers.push(actor)
          end
        end
      when 3  # 味方単体
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_troop.smooth_target_enemy(index))
      when 4  # 味方全体
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 5  # 味方単体 (HP 0)
        index = @active_battler.current_action.target_index
        enemy = $game_troop.enemies[index]
        if enemy != nil and enemy.hp0?
          @target_battlers.push(enemy)
        end
      when 6  # 味方全体 (HP 0)
        for enemy in $game_troop.enemies
          if enemy != nil and enemy.hp0?
            @target_battlers.push(enemy)
          end
        end
      when 7  # 使用者
        @target_battlers.push(@active_battler)
      end
    end
    # 行動側バトラーがアクターの場合
    if @active_battler.is_a?(Game_Actor)
      # 効果範囲で分岐
      case scope
      when 1  # 敵単体
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_troop.smooth_target_enemy(index))
      when 2  # 敵全体
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 3  # 味方単体
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_party.smooth_target_actor(index))
      when 4  # 味方全体
        for actor in $game_party.actors
          if actor.exist?
            @target_battlers.push(actor)
          end
        end
      when 5  # 味方単体 (HP 0)
        index = @active_battler.current_action.target_index
        actor = $game_party.actors[index]
        if actor != nil and actor.hp0?
          @target_battlers.push(actor)
        end
      when 6  # 味方全体 (HP 0)
        for actor in $game_party.actors
          if actor != nil and actor.hp0?
            @target_battlers.push(actor)
          end
        end
      when 7  # 使用者
        @target_battlers.push(@active_battler)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● スキルアクション 結果作成
  #--------------------------------------------------------------------------
  def make_skill_action_result
    # スキルを取得
    @skill = $data_skills[@active_battler.current_action.skill_id]
    # 強制アクションでなければ
    unless @active_battler.current_action.forcing
      # SP 切れなどで使用できなくなった場合
      unless @active_battler.skill_can_use?(@skill.id)
        # アクション強制対象のバトラーをクリア
        $game_temp.forcing_battler = nil
        # ステップ 1 に移行
        @phase4_step = 1
        return
      end
    end
    # SP 消費
    @active_battler.sp -= @skill.sp_cost
    # ステータスウィンドウをリフレッシュ
    @status_window.refresh
    # ヘルプウィンドウにスキル名を表示
    @help_window.set_text(@skill.name, 1)
    # アニメーション ID を設定
    @animation1_id = @skill.animation1_id
    @animation2_id = @skill.animation2_id
    # コモンイベント ID を設定
    @common_event_id = @skill.common_event_id
    # 対象側バトラーを設定
    set_target_battlers(@skill.scope)
    # スキルの効果を適用
    for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
    end
  end
  #--------------------------------------------------------------------------
  # ● アイテムアクション 結果作成
  #--------------------------------------------------------------------------
  def make_item_action_result
    # アイテムを取得
    @item = $data_items[@active_battler.current_action.item_id]
    # アイテム切れなどで使用できなくなった場合
    unless $game_party.item_can_use?(@item.id)
      # ステップ 1 に移行
      @phase4_step = 1
      return
    end
    # 消耗品の場合
    if @item.consumable
      # 使用したアイテムを 1 減らす
      $game_party.lose_item(@item.id, 1)
    end
    # ヘルプウィンドウにアイテム名を表示
    @help_window.set_text(@item.name, 1)
    # アニメーション ID を設定
    @animation1_id = @item.animation1_id
    @animation2_id = @item.animation2_id
    # コモンイベント ID を設定
    @common_event_id = @item.common_event_id
    # 対象を決定
    index = @active_battler.current_action.target_index
    target = $game_party.smooth_target_actor(index)
    # 対象側バトラーを設定
    set_target_battlers(@item.scope)
    # アイテムの効果を適用
    for target in @target_battlers
      target.item_effect(@item)
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 3 : 行動側アニメーション)
  #--------------------------------------------------------------------------
  def update_phase4_step3
    # 行動側アニメーション (ID が 0 の場合は白フラッシュ)
    if @animation1_id == 0
      @active_battler.white_flash = true
    else
      @active_battler.animation_id = @animation1_id
      @active_battler.animation_hit = true
    end
    # ステップ 4 に移行
    @phase4_step = 4
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 4 : 対象側アニメーション)
  #--------------------------------------------------------------------------
  def update_phase4_step4
    # 対象側アニメーション
    for target in @target_battlers
      target.animation_id = @animation2_id
      target.animation_hit = (target.damage != "Raté")
    end
    # アニメーションの長さにかかわらず、最低 8 フレーム待つ
    @wait_count = 8
    # ステップ 5 に移行
    @phase4_step = 5
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 5 : ダメージ表示)
  #--------------------------------------------------------------------------
  def update_phase4_step5
    # ヘルプウィンドウを隠す
    @help_window.visible = false
    # ステータスウィンドウをリフレッシュ
    @status_window.refresh
    # ダメージ表示
    for target in @target_battlers
      if target.damage != nil
        target.damage_pop = true
      end
    end
    # ステップ 6 に移行
    @phase4_step = 6
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
  #--------------------------------------------------------------------------
  def update_phase4_step6
    # アクション強制対象のバトラーをクリア
    $game_temp.forcing_battler = nil
    # コモンイベント ID が有効の場合
    if @common_event_id > 0
      # イベントをセットアップ
      common_event = $data_common_events[@common_event_id]
      $game_system.battle_interpreter.setup(common_event.list, 0)
    end
    # ステップ 1 に移行
    @phase4_step = 1
  end
end
Et le message d'erreur :

[XP] Scene Battle Bug_sc10
Revenir en haut Aller en bas
daninouvelstar
Paysan (niveau 1)
Paysan (niveau 1)
daninouvelstar

Masculin
Messages postés : 5
Date d'inscription : 07/10/2013
Jauge LPC :
[XP] Scene Battle 89152714000 / 1000 / 100[XP] Scene Battle 8915271400


[XP] Scene Battle Empty
MessageSujet: Re: [XP] Scene Battle   [XP] Scene Battle EmptyMer 9 Oct 2013 - 23:10

Il y a une méthode "enable_item" qui est appelée et qui ne fait pas partie du script de base et que tu appelle par une instance de la classe Window_Command "@actor_command_window". Regarde sur tous les scripts sur lesquels tu t'es inspiré si dans les classes Window_Command ou bien dans ses classes parentes tu as la définition de cette méthode.
Revenir en haut Aller en bas
Mack
Chevalier (niveau 5)
Chevalier (niveau 5)
Mack

Messages postés : 126
Date d'inscription : 26/06/2013
Jauge LPC :
[XP] Scene Battle 891527140077 / 10077 / 100[XP] Scene Battle 8915271400


[XP] Scene Battle Empty
MessageSujet: Re: [XP] Scene Battle   [XP] Scene Battle EmptyJeu 10 Oct 2013 - 7:35

EDIT : Autant pour moi, mon navigateur essayer de me traduire la page ...


Du coup, j'essaierais d'y jeter un oeil ce soir si j'ai le temps.


Re-EDIT :
En faite, je suis à peu près sur que ça vienne d'un des scripts que t'as ajouté.
J'ai déjà vu exactement la même erreur sur plusieurs projet qui utilisé un script avec le même but que le tiens ( Donc avoir un sous menu pour les compétences ) et qui avait exactement le même bug.
Donc je suppose que vous utilisez tous le même script, qui est buggué des le départ :'D.



M'enfin, c'pas une très grosse erreur non plus ( Même si ça craint de la part du créateur d'avoir laisser un truc comme ça et de le proposer :sifflote: )

Remplace :
Code:
if Input.trigger?(Input::B)
@command_competence.visible=false
@actor_command_window.active=true
if $game_party.actors[@actor_index].state?(68)
        @actor_command_window.disable_item(0)
      else
        @actor_command_window.enable_item(0)
      end
end
Par :
Code:
  if Input.trigger?(Input::B)
    @command_competence.visible=false
    @actor_command_window.active=true
    if $game_party.actors[@actor_index].state?(68)
      @actor_command_window.disable_item(0)
    else
      @actor_command_window.draw_item(0,@actor_command_window.contents.font.color)
    end
  end
Revenir en haut Aller en bas
Kakashi18
Chevalier Mage (niveau 1)
Chevalier Mage (niveau 1)
Kakashi18

Masculin
Messages postés : 392
Date d'inscription : 15/05/2013
Jauge LPC :
[XP] Scene Battle 891527140024 / 10024 / 100[XP] Scene Battle 8915271400

[XP] Scene Battle Membre10
[XP] Scene Battle Collec10


[XP] Scene Battle Empty
MessageSujet: Re: [XP] Scene Battle   [XP] Scene Battle EmptyLun 14 Oct 2013 - 13:45

Merci beaucoup de ton aide je teste ça tout de suite.

Edit : Même erreur :/

[XP] Scene Battle Bug_sc10
Revenir en haut Aller en bas
daninouvelstar
Paysan (niveau 1)
Paysan (niveau 1)
daninouvelstar

Masculin
Messages postés : 5
Date d'inscription : 07/10/2013
Jauge LPC :
[XP] Scene Battle 89152714000 / 1000 / 100[XP] Scene Battle 8915271400


[XP] Scene Battle Empty
MessageSujet: Re: [XP] Scene Battle   [XP] Scene Battle EmptyLun 14 Oct 2013 - 21:21

Si tu as fait la modification de Mack, tu ne devrais plus avoir le mot "enable_item" à la ligne 129 de la 3ème partie du script définissant la classe Scene_Battle. A vérifier.
Revenir en haut Aller en bas
Mack
Chevalier (niveau 5)
Chevalier (niveau 5)
Mack

Messages postés : 126
Date d'inscription : 26/06/2013
Jauge LPC :
[XP] Scene Battle 891527140077 / 10077 / 100[XP] Scene Battle 8915271400


[XP] Scene Battle Empty
MessageSujet: Re: [XP] Scene Battle   [XP] Scene Battle EmptyMer 16 Oct 2013 - 17:47

Totalement pas normal.
J'vais te prendre pour un débile, faudra pas m'en vouloir, mais t'as bien modifié ton script Scene_Battle 3 vers la ligne 120 ?



Sinon, remplaces le par ça :
Code:
#==============================================================================
# ¦ Scene_Battle (???? 3)
#------------------------------------------------------------------------------
#==============================================================================

class Scene_Battle
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def start_phase3
# ???? 3 ???
@phase = 3
# ?????????????
@actor_index = -1
@active_battler = nil
# ??????????????
phase3_next_actor
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def phase3_next_actor
$option2=false
# ???
begin
# ???????????? OFF
if @active_battler != nil
@active_battler.blink = false
end
# ??????????
if @actor_index == $game_party.actors.size-1
# ?????????
start_phase4
return
end
# ???????????????
@actor_index += 1
      @active_battler = $game_party.actors[@actor_index]
      @active_battler.blink = true
    # Once more if actor refuses command input
    end until @active_battler.inputable?
    # Set up actor command window
    phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def phase3_prior_actor
# ???
begin
# ???????????? OFF
if @active_battler != nil
@active_battler.blink = false
end
# ??????????
if @actor_index == 0
# ??????????????
start_phase2
return
end
# ??????????????
@actor_index -= 1
      @active_battler = $game_party.actors[@actor_index]
      @active_battler.blink = true
    # Once more if actor refuses command input
    end until @active_battler.inputable?
    # Set up actor command window
    phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ? ????????????????????
#--------------------------------------------------------------------------
def phase3_setup_command_window
# ?????????????????
@party_command_window.active = false
@party_command_window.visible = false
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
# ???????????????????
@actor_command_window.x = @actor_index * 160
# Set index to 0
    @actor_command_window.index = 0
end
#--------------------------------------------------------------------------
# ? ?????? (????????????)
#--------------------------------------------------------------------------
def update_phase3
if @command_competence.visible
update_command2
else
# ?????????????
if @enemy_arrow != nil
update_phase3_enemy_select
# ?????????????
elsif @actor_arrow != nil
update_phase3_actor_select
# ??????????????
elsif @skill_window != nil
update_phase3_skill_select
# ???????????????
elsif @item_window != nil
update_phase3_item_select
# ???????????????????
elsif @actor_command_window.active
update_phase3_basic_command
end
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_command2
  @command_competence.update
  @actor_command_window.active=false
  @command_competence.active=true
  if Input.trigger?(Input::C)
    $option_magie=@mot_clef[@command_competence.index]
    @command_competence.visible=false
    @actor_command_window.visible=false
    start_skill_select
  end
  if Input.trigger?(Input::B)
    @command_competence.visible=false
    @actor_command_window.active=true
    if $game_party.actors[@actor_index].state?(68)
      @actor_command_window.disable_item(0)
    else
      @actor_command_window.draw_item(0,@actor_command_window.contents.font.color)     
      #@actor_command_window.enable_item(0)
    end
  end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_phase3_basic_command
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????????
phase3_prior_actor
return
end
# If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by actor command window cursor position
      case @actor_command_window.index
      when 0  # attack
        if @active_battler.state?(68)
          $game_system.se_play($data_system.buzzer_se)
        else
          # Play decision SE
          $game_system.se_play($data_system.decision_se)
          # Set action
          @active_battler.current_action.kind = 0
          @active_battler.current_action.basic = 0
          # Start enemy selection
          start_enemy_select
  end
    when 1 # ???
@command_competence.visible=true
if @actor_index * 160+100>480
@command_competence.x = @actor_index * 160-100
else
@command_competence.x = @actor_index * 160+100
end
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.kind = 1
# update_phase3_basic_command
# ?????????
when 2 # ??
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
# ??????????????
phase3_next_actor
when 3 # ????
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.kind = 2
# ??????????
start_item_select
end
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ?????)
#--------------------------------------------------------------------------
def update_phase3_skill_select
# ????????????????
@skill_window.visible = true
# ???????????
@skill_window.update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ?????????
end_skill_select
return
end
# C ??????????
if Input.trigger?(Input::C)
# ????????????????????????
@skill = @skill_window.skill
# ????????
if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.skill_id = @skill.id
# ?????????????????
@skill_window.visible = false
# ???????????
if @skill.scope == 1
# ??????????
start_enemy_select
# ????????????
elsif @skill.scope == 3 or @skill.scope == 5
# ??????????
start_actor_select
# ?????????????
else
# ?????????
end_skill_select
# ??????????????
phase3_next_actor
end
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_phase3_item_select
# ?????????????????
@item_window.visible = true
# ????????????
@item_window.update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????
end_item_select
return
end
# C ??????????
if Input.trigger?(Input::C)
# ?????????????????????????
@item = @item_window.item
# ????????
unless $game_party.item_can_use?(@item.id)
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.item_id = @item.id
# ??????????????????
@item_window.visible = false
# ???????????
if @item.scope == 1
# ??????????
start_enemy_select
# ????????????
elsif @item.scope == 3 or @item.scope == 5
# ??????????
start_actor_select
# ?????????????
else
# ??????????
end_item_select
# ??????????????
phase3_next_actor
end
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_phase3_enemy_select
# ??????????
@enemy_arrow.update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????
end_enemy_select
return
end
# C ??????????
if Input.trigger?(Input::C)
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.target_index = @enemy_arrow.index
# ??????????
end_enemy_select
# ??????????????
if @skill_window != nil
# ?????????
end_skill_select
end
# ???????????????
if @item_window != nil
# ??????????
end_item_select
end
# ??????????????
phase3_next_actor
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
def update_phase3_actor_select
# ??????????
@actor_arrow.update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????
end_actor_select
return
end
# C ??????????
if Input.trigger?(Input::C)
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????
@active_battler.current_action.target_index = @actor_arrow.index
# ??????????
end_actor_select
# ??????????????
if @skill_window != nil
# ?????????
end_skill_select
end
# ???????????????
if @item_window != nil
# ??????????
end_item_select
end
# ??????????????
phase3_next_actor
end
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def start_enemy_select
# ??????????
@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)
# ?????????????
@enemy_arrow.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def end_enemy_select
# ??????????
@enemy_arrow.dispose
@enemy_arrow = nil
# ????? [??] ???
if @actor_command_window.index == 0
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
# ???????????
@help_window.visible = false
end
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def start_actor_select
# ??????????
@actor_arrow = Arrow_Actor.new(@spriteset.viewport2)
@actor_arrow.index = @actor_index
# ?????????????
@actor_arrow.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def end_actor_select
# ??????????
@actor_arrow.dispose
@actor_arrow = nil
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def start_skill_select
# ???????????
@skill_window = Window_Skill.new(@active_battler)
# ?????????????
@skill_window.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def end_skill_select
# ???????????
@skill_window.dispose
@skill_window = nil
# ???????????
@help_window.visible = false
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def start_item_select
# ????????????
@item_window = Window_Item.new
# ?????????????
@item_window.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def end_item_select
# ????????????
@item_window.dispose
@item_window = nil
# ???????????
@help_window.visible = false
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
end
end
M'enfin, de mon côté y a pas de bug, donc si chez toi ça bug, je pourrais rien faire sans démo contenant tout les scripts.
Revenir en haut Aller en bas
Contenu sponsorisé




[XP] Scene Battle Empty
MessageSujet: Re: [XP] Scene Battle   [XP] Scene Battle Empty

Revenir en haut Aller en bas
 
[XP] Scene Battle
Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Scene by key
» Scene By Key
» Concours de Scene-title
» Moriath entre en scène !
» [vote] Concours de scène. [Décembre]

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Le Palais Créatif :: ~ APPRENTISSAGE ~ :: Entraide :: Problèmes non résolus-
Sauter vers: