I have 1 TITLEMAP and 7 maps in a hub. I have not assigned music to any of the maps in MAPINFO, because I don't want the maps to have music. I have a music folder, within which I have several music tracks in mp3 format. I want to start music at specific points in the game, typically done via a script. [An example is: SetMusic ("D_Map03", 0);] Here is the complete script for a cut-scene that is supposed to have music:
int osprey1; script 33 (void) { if (!osprey1) // if (override && !osprey1) { osprey1 = 1; delay(const:35*1); SetPlayerProperty(1, 1, PROP_TOTALLYFROZEN); SetPlayerProperty(1, 2, PROP_INVULNERABILITY); FadeTo (0, 0, 0, 1.0, 4.0); //Fades to black in 4 seconds delay(const:35*5); SetMusic ("D_Map03", 0); ChangeCamera (130, 0, 0); FadeTo (0, 0, 0, 0.0, 5.0); //Fades out of black in 5 seconds Thing_Activate(130); ACS_Execute (29,0,0,0,0); //Activates Barney, grunt delay(const:35*2); Teleport_NoFog(34, 1, 0); //Moves player in the open to lure enemies ACS_Execute (34,0,0,0,0); ACS_Execute (35,0,0,0,0); delay(const:35*34); SpawnSpot ("HLGruntAny", 5, 0, 64); SpawnSpot ("HLGruntM16", 6, 0, 64); delay(const:35*6); FadeTo (0, 0, 0, 1.0, 5.0); delay(const:35*6); Teleport_NoFog(35, 1, 0); //Moves player behind crate for protection Thing_Remove (1); //Removes Osprey SetPlayerProperty(1, 0, PROP_TOTALLYFROZEN); SetPlayerProperty(1, 0, PROP_INVULNERABILITY); ChangeCamera (0, 0, 0); FadeTo (0, 0, 0, 0.0, 5.0); SetMusic ("*", 0); } }
NOTE: Scripts 34 & 35 are for the Osprey behavior.
Another problem I'm having is that the invulnerability special seems to be disabled. The player takes damage from the spawned enemies during the cut-scene.
Yet another problem is that after the first "pass" I want the Osprey (TID =1) to stop circling around. Hence the line: Thing_Remove (1); However, this does not remove the Osprey, and it circles back around. I could terminate the script, but I'd have to do it externally.
Enjay wrote:I assume that the music file in the music folder is named d_map03.mp3 (or d_map03.lmp, or whatever) ?
Yes, the lump names are in the proper nomenclature format (e.g., d_map03.mp3). Does it matter if they are capitalized?
Not sure about the invulnerability thing.
I didn't realize that the invulnerability duration via a script was the same as that with a powerup/pickup (i.e., 30 seconds). I've modified the scripts to restore the invulnerability every 25 seconds. Things work just as intended now.
Turns out that the lump name needs to have consistent capitalization - either all caps or all lower case. I changed the lump names to the following format: D_MAP03, and changed the script accordingly, and the music played just fine. [Or maybe it's just the script that needs all caps. Whatever it was, it's fixed now.]
Curious. I guess that I have always been consistent in my capitalization then. If this genuinely is the the case, I wonder if it should be reported as an issue to be fixed? Most case sensitive situations that are comparable to this have been removed I think.