luistop12Miér Ene 16, 2013 6:18 pm
SUPER MODERADOR
¿Que? naaaaaaaa este script te permite cambiar la musica en caso de que los enemigo te rodeen o tu empiezes atacando
creditos:modern algebra
- Código:
#==============================================================================
# Ambush BGMs
# Version: 1.0
# Author: modern algebra (rmrk.net)
# Date: April 20, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Description:
# This script makes it so that preemptive battles and surprise battles can
# have different BGMs playing than regular battles.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Instructions:
# Insert this script above Main and below other custom scripts.
#
# You can set the default audio files for this at lines 49 and 50. Just
# change the words in quotes ("") to the names of the BGM files you choose.
#
# To change the bgms for preemptive and/or surprise battles during the
# course of a game, all that you need to do is use the following codes in a
# script call:
#
# $game_system.preemptive_battle_bgm = "filename"
# $game_system.surprise_battle_bgm = "filename"
#
# where "filename" is the name of the BGM file you wish to change it to.
#==============================================================================
#==============================================================================
# ** Game_System
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased method - initialize, battle_bgm
# new instance variables - preemptive_battle_bgm, surprise_battle_bgm
#==============================================================================
class Game_System
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Public Instance Variables
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attr_accessor :preemptive_battle_bgm # BGM to be played if pre-emptive
attr_accessor :surprise_battle_bgm # BGM to be played if surprised
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias ma_wt56_bgmspresur_init_7nff4 initialize
def initialize (*args)
# RUn Original Method
ma_wt56_bgmspresur_init_7nff4 (*args)
# Initialize Special Battle BGMs
@preemptive_battle_bgm = "Battle2"
@surprise_battle_bgm = "Battle3"
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Battle BGM
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias modalg_wltr3565_btlbgm_srprsbm_63h4 battle_bgm
def battle_bgm (*args)
# If special attack occurs
if $game_troop != nil && $game_troop.preemptive
return RPG::BGM.new (@preemptive_battle_bgm)
elsif $game_troop != nil && $game_troop.surprise
return RPG::BGM.new (@surprise_battle_bgm)
else
# Give normal BGM
return modalg_wltr3565_btlbgm_srprsbm_63h4 (*args)
end
end
end
creditos:modern algebra
Última edición por luistop12 el Miér Ene 16, 2013 8:05 pm, editado 1 vez