Yeah, those are only used in User Interface mode on the Diplomacy and Game Loading screens. You won't for example be able to use anything UI.X in a GameplayScript.
SetSoundSwitchValue has only limited choices for the first parameter
I have read these thread (a very interesting one) - but my problem is that here I want to play the existing music - somehow I can't managed to call it reliably
Yeah, those are only used in User Interface mode on the Diplomacy and Game Loading screens. You won't for example be able to use anything UI.X in a GameplayScript..
That would work - I planned to use it via UI Script probably using the chat panel with a set of command like play track or next track.
My issue is that I don't seem to be able to reliably call a track: I am assuming for music you need to use SetSoundSwitchValue and then PlaySound in a specific manner.
You have to find events and use playsound only, playsound("stop_..... Playsound ("play_, or something like that. Don't know if plays internal since I was worried about my music at the time.
Example from my mod:
Spoiler:
if (iPlayerEra > iCurrentGameEra) then
-- Stop Portugal Music
UI.PlaySound("Stop_Music_PORTUGAL");
if(iPlayerEra ==2) then
UI.PlaySound("Stop_Ancient_Music_PORTUGAL");
UI.PlaySound("Play_Classical_Music_PORTUGAL");
elseif(iPlayerEra ==3) then
UI.PlaySound("Stop_Classical_Music_PORTUGAL");
UI.PlaySound("Play_Medieval_Music_PORTUGAL");
.....
You have to find events and use playsound only, playsound("stop_..... Playsound ("play_, or something like that. Don't know if plays internal since I was worried about my music at the time.
Yes I am familiar with this - I do suspect the internal music have something along UI.Playsound("Music") and then uses SetSoundSwitchValue to feed different track.... However if we would have the internal music "event" we could call them individually.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.