질문과 답변

Extra Form

기본적인 rpgvxa 턴제로 게임을 구현할 경우 전투가 끝난 이후 획득 exp, 골드 등이 표시되고 레벨업이 표시되면 엔터를 눌러야 전투가 끝나는데, 이렇게 따로 엔터를 누를 필요 없이 그냥 자동으로 전투가 끝나게 하려면 어떻게 해야 하나요? 

그러니까 메세지가 끝나면 다음 메세지로 넘어가기 위해서 엔터를 눌러야 하는데 이렇게 엔터를 누를 필요 없이 다음 메세지가 순차적으로 나오고 또 그 이후 자동으로 전투가 종료되려면 어떻게 해야하는지 궁금합니다.

스크립트에서 여기저기 둘러보긴 했는데 어딜 어떻게 고쳐야 할지 모르겠네요.

Comment '2'
  • ?
    아이미르 2012.12.18 17:33

    #==============================================================================
    # ■ BattleManager
    #------------------------------------------------------------------------------
    #  전투의 진행을 관리하는 모듈입니다.
    #==============================================================================

    module BattleManager
      #--------------------------------------------------------------------------
      # ● 도주의 처리
      #--------------------------------------------------------------------------
      def self.process_escape
        $game_message.add(sprintf(Vocab::EscapeStart, $game_party.name))
        success = @preemptive ? true : (rand < @escape_ratio)
        Sound.play_escape
        if success
          $game_message.add('\|\^')
          process_abort
        else
          @escape_ratio += 0.1
          $game_message.add('\.' + Vocab::EscapeFailure + '\.\^')
          $game_party.clear_actions
        end
        wait_for_message
        return success
      end
      #--------------------------------------------------------------------------
      # ● 패배의 처리
      #--------------------------------------------------------------------------
      def self.process_defeat
        text = sprintf(Vocab::Defeat, $game_party.name)
        $game_message.add('\.' + text + '\|\^')
        wait_for_message
        if @can_lose
          revive_battle_members
          replay_bgm_and_bgs
          SceneManager.return
        else
          SceneManager.goto(Scene_Gameover)
        end
        battle_end(2)
        return true
      end

      #--------------------------------------------------------------------------
      # ● 경험치의 획득과 레벨업의 표시
      #--------------------------------------------------------------------------
      def self.gain_exp
        $game_party.all_members.each do |actor|
          actor.gain_exp($game_troop.exp_total)
        end
       
        $game_message.add('\|\^')
        wait_for_message
      end
    end

     

    이 스크립트를 추가해주세요.

    이는 문장의 표시에서

     

    \| 1초 대기

    \^ 문장 종료 대기 스킵

     

    을 이용한 겁니다.

  • ?
    담먹캐 2012.12.19 00:46
    감사합니다!
    문장 대기 스킵만 추가하면 되는거였군요

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12442
Board Pagination Prev 1 ... 19 Next
/ 19