기본적인 rpgvxa 턴제로 게임을 구현할 경우 전투가 끝난 이후 획득 exp, 골드 등이 표시되고 레벨업이 표시되면 엔터를 눌러야 전투가 끝나는데, 이렇게 따로 엔터를 누를 필요 없이 그냥 자동으로 전투가 끝나게 하려면 어떻게 해야 하나요?
그러니까 메세지가 끝나면 다음 메세지로 넘어가기 위해서 엔터를 눌러야 하는데 이렇게 엔터를 누를 필요 없이 다음 메세지가 순차적으로 나오고 또 그 이후 자동으로 전투가 종료되려면 어떻게 해야하는지 궁금합니다.
스크립트에서 여기저기 둘러보긴 했는데 어딜 어떻게 고쳐야 할지 모르겠네요.
#==============================================================================
# ■ 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초 대기
\^ 문장 종료 대기 스킵
을 이용한 겁니다.