Random Battle Themes
Version: 1.1
Author: DiamondandPlatinum3
Date: July 23, 2012
Planned Future Versions
Cool. :)
But why not use case rather than use if? It doesn't really make a difference it just saves a bit of time and looks better in my opinion.
case @bt
when 1
@battle_bgm = "Audio/BGM/" + RNDM_Battle_Themes::First_Random_Battle_Theme
Audio.bgm_play(@battle_bgm, @bgm_volume, @bgm_pitch)
when 2
@battle_bgm = "Audio/BGM/" + RNDM_Battle_Themes::Second_Random_Battle_Theme
Audio.bgm_play(@battle_bgm, @bgm_volume, @bgm_pitch)
when 3
@battle_bgm = "Audio/BGM/" + RNDM_Battle_Themes::Third_Random_Battle_Theme
Audio.bgm_play(@battle_bgm, @bgm_volume, @bgm_pitch)
when 4
@battle_bgm = "Audio/BGM/" + RNDM_Battle_Themes::Fourth_Random_Battle_Theme
Audio.bgm_play(@battle_bgm, @bgm_volume, @bgm_pitch)
when 5
@battle_bgm = "Audio/BGM/" + RNDM_Battle_Themes::Fifth_Random_Battle_Theme
Audio.bgm_play(@battle_bgm, @bgm_volume, @bgm_pitch)
else
$game_system.battle_bgm.play
end
You know something, that DOES look better :)
I didn't know that case worked with variable IDs like that :o Not in RGSS at least
Edited script and added you to thanks list :D