XP 스크립트

설정해둔 전투음악 중 임의의 곡을 전투시 연주하는 스크립트입니다.  전투음악은 스크립트에서 미리 설정해 둘 수도 있고 이벤트 명령->스크립트에서 추가하거나 삭제할 수 있습니다.


class Game_Party
  attr_accessor  :music
  alias pre_music_initialize initialize
  def initialize
    pre_music_initialize
    @music = []
  end
end

class Scene_Map
  def call_battle
    # Clear battle calling flag
    $game_temp.battle_calling = false
    # Clear menu calling flag
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    # Make encounter count
    $game_player.make_encounter_count
    # Memorize map BGM and stop BGM
    $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
    # Play battle start SE
    $game_system.se_play($data_system.battle_start_se)
    # Play battle BGM
    file = $game_party.music[rand($game_party.music.size)]
    audio_file = RPG::AudioFile.new(file)
    $game_system.bgm_play(audio_file)
    # Straighten player position
    $game_player.straighten
    # Switch to battle screen
    $scene = Scene_Battle.new
  end
end


전투음악 기본설정은
@music = [파일명1, 파일명2, ......파일명n]
으로 할 수 있고, 게임 중에서 추가/삭제하는 것은:
$game_party.music.push("MusicName") <- 사용할 전투음악 추가 (확장자 생략)
$game_party.music.delete("MusicName") <- 전투음악 삭제 (확장자 생략)

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6203
114 전투 물리친 적의수 표시 file 백호 2009.02.21 1131
113 전투 맨손 공격력,속성 설정 스크립트 4 file 백호 2009.02.21 1294
112 전투 매턴 자동 회복이나 도트힐 3 file 백호 2009.02.22 1352
111 전투 마법반사 스크립트 1 file 백호 2009.02.21 1217
110 전투 마법검 스크립트 file 백호 2009.02.21 1118
109 전투 마법검 스크립트 1 백호 2009.02.22 1426
108 전투 렙업했을때 포인트 주고 스탯 올리기 7 file 백호 2009.02.21 1685
107 전투 레벨업시 능력치 표시 2 백호 2009.02.22 1621
106 전투 레벨업 시스템 제거 스크립트 file 백호 2009.02.21 1117
105 전투 레벨 상승 화면 개조 스크립트 4 file 백호 2009.02.21 1884
104 전투 랜덤으로 적을 출현시키는 스크립트 백호 2009.02.21 1216
» 전투 랜덤 전투음악 by Fomar0153@rmxp.org 1 백호 2009.02.22 1008
102 전투 데미지마루 백호 2009.02.21 1163
101 전투 데미지 표시 개조 8 file 백호 2009.02.21 2532
100 전투 데미지 폰트변경 7 카르닉스 2010.02.26 2600
99 전투 데미지 출력 스크립트 6 백호 2009.02.22 1810
98 전투 대전게임 Fighter 1 file 백호 2009.02.21 1436
97 전투 깔끔한형식의 Asan'Tear배틀시스탬 4 file 콩밥 2010.09.29 4124
96 전투 간단한 액알 스크립트!(1번째) 2 백호 2009.02.21 3166
95 전투 간단 액알 스크립티!(2번째) 2 백호 2009.02.21 2696
Board Pagination Prev 1 2 3 4 5 6 7 8 9 Next
/ 9