[ create a new paste ] login | about

Link: http://codepad.org/aYUaRGux    [ raw code | fork ]

Lua, pasted on Nov 25:
local group_sound_file = {
	["DanceDanceRevolution"] = "soundfile_1",
	["DDR 2ndMIX"] = "soundfile_2",
	["DDR 3rdMIX"] = "soundfile_3",
	--- you may add here as many as you like
};

CodeMessageCommand=function(self,params)
	local player = params.PlayerNumber;
	
	if not GAMESTATE:IsHumanPlayer(player) then return end
	
	if params.Name == "Start" then
		local mw = SCREENMAN:GetTopScreen():GetMusicWheel();
		local mwiType = ToEnumShortString(mw:GetSelectedType());
		local curSection = mw:GetSelectedSection();
		local mwiExpanded = GAMESTATE:GetExpandedSectionName();
		
		if mwiType == "Section" then
			if curSection == mwiExpanded and group_sound_file[mwiExpanded] then
				SOUND:PlayOnce( THEME:GetPathS("_sound", "effects/" .. group_sound_file[mwiExpanded] .. ".mp3") )
			end
		end
	end
end;


Create a new paste based on this one


Comments: