Play Music/Sound string
Posted: Wed Jul 26, 2006 8:29 am
Because the sound file is compressed, the sound path should become invalid when the game is exported. So if I have
the first one should work, but the second one shouldn't, correct?
This is annoying because I wnt to have objects that play music and I want to assign it to a variable. I could use a switch with an integer, but that would get tedious as I would have to put the entire code in where as if I could use a string stored in a text actor it would be easier.
- Code: Select all
PlaySound2("data/sound.wav", 1, 1, 0);
- Code: Select all
char *soundpath = "data/sound.wav";
PlaySound2(soundpath, 1, 1, 0);
the first one should work, but the second one shouldn't, correct?
This is annoying because I wnt to have objects that play music and I want to assign it to a variable. I could use a switch with an integer, but that would get tedious as I would have to put the entire code in where as if I could use a string stored in a text actor it would be easier.