ok im back'
i have just change small things in the
title.lua and the loadgame.lua scripts
in title.lua i have just stop the music from playing like this:
-- load title music if any
if g_playtitlemusic == 0 then
LoadGlobalSound ( "titlesbank\\default\\title.ogg", 1 )
--LoopGlobalSound ( 1 ) -- pcs
g_playtitlemusic = 1
end
and were the music normally stops when the game are loaded i have change it like this to let it play.:
if iHighlightButton==TITLE_NEW then
LoopGlobalSound ( 1 ) --- pcs
--StopGlobalSound ( 1 ) --- pcs
SwitchPage("")
end
and to have a diferent song to play when loading a level i have change
loadgame.lua like this.: by adding this line in the loadgame_init()
LoadGlobalSound ( "titlesbank\\default\\loadlevel.ogg", 2 ) ---pcs
and also to let the song play were they stop it normally when the levels are loaded , changed it to :
if iHighlightButton>=LOADGAME_SLOT_FIRST and iHighlightButton<=LOADGAME_SLOT_LAST then
if g_strSlotNames[iHighlightButton] ~= "EMPTY PROGRESS SLOT" then
-- load slot file
RestoreGameFromSlot(iHighlightButton)
-- advance warning of level file in case load from MAIN MENU (before level loading step)
LevelFilenameToLoad(g_strLevelFilenames[iHighlightButton])
-- back to game
LoopGlobalSound ( 2 ) --- pcs
--StopGlobalSound ( 1 ) -- pcs
ResetFade()
TriggerFadeIn()
ResumeGame()
end
And i have made a small script stopglobalsound.lua , just to stop the global sounds when game start.
one can use it to fade sound out or stop it as player enters level.
Pcs
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11