Agh, i've tried everything here, with still no luck.
I want to resume progress on my game, but I have one scripting problem that's holding me back. Most likely a minor scripting problem I'm not noticing, but I've tried everything I can think of, all to no avail.
I'm trying to make a jukebox sort of thing where the player can press a button and music will play. At first, it seemed simple enough.
I tried using hotspots, scripting it so that PlayMusic would play the appropriate song corresponding to the button. That didn't work, so I tried putting it in a GUI (where when a button was pressed the appropraite PlayMusic would be activated) and when I press a button, it would animate appropriately by temporarily going over to the other view, making it obvious that the button was being pressed properly, but there was still no change in the music. Then I read the manual some more and found a sentance saying that if PlayMusic was used in an interaction, you need to use PlaySound and add a thousand to the music number so that the engine would recognize it as music. I tried, and it still didn't work.
I've tried stopping the current music before the new music plays, still no luck.
And no, there is no default room music in the room where the jukebox is.
My current script is this:
If (interface == 11){
if (button == 0){
StopMusic();
PlayMusic (21);
}
if (button == 1){
StopMusic();
PlayMusic(22);
}
and so on..
So, what am I doing wrong here?
I want to resume progress on my game, but I have one scripting problem that's holding me back. Most likely a minor scripting problem I'm not noticing, but I've tried everything I can think of, all to no avail.
I'm trying to make a jukebox sort of thing where the player can press a button and music will play. At first, it seemed simple enough.
I tried using hotspots, scripting it so that PlayMusic would play the appropriate song corresponding to the button. That didn't work, so I tried putting it in a GUI (where when a button was pressed the appropraite PlayMusic would be activated) and when I press a button, it would animate appropriately by temporarily going over to the other view, making it obvious that the button was being pressed properly, but there was still no change in the music. Then I read the manual some more and found a sentance saying that if PlayMusic was used in an interaction, you need to use PlaySound and add a thousand to the music number so that the engine would recognize it as music. I tried, and it still didn't work.
I've tried stopping the current music before the new music plays, still no luck.
And no, there is no default room music in the room where the jukebox is.
My current script is this:
If (interface == 11){
if (button == 0){
StopMusic();
PlayMusic (21);
}
if (button == 1){
StopMusic();
PlayMusic(22);
}
and so on..
So, what am I doing wrong here?