Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: jedione on March 06, 2017, 07:40:40 AM
-
not sure if this is a general or scripting Q:
how would i get music to play only when you are in the display menu...
i set ambient sound ,, but it plays everywhere
thanks..
-
I think the best option is to.add a custom music for your menu theme.
I have a little code for this on my computer.
Something like fe.add music....
I'll paste later if you want.
-
yes please.......thankx
-
// sound
local mysong = fe.add_sound("music.mp3");
mysong.file_name = music.mp3";
mysong.loop = true;
mysong.playing = true;
;)
-
where would you put this code? in the layout.nut file for the display?
-
just put the code into the layout.nut file of the theme that is being used as your display-menu
then drop an mp3 file into the layout, make sure to rename it of course!
done.
-
EDIT
doh nevermind figured it out. Thanks!
-
I do have one more problem with this script. When I exit a game back to the theme, the music no longer plays. Any way around this?
-
It has been discussed in forums before and cocluded that it is bug in AM,
Maybe will be fixed in future release