Page 1 of 1

Problems with using music properly

Posted: Sun Dec 27, 2009 6:19 pm
by ReX
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:
Spoiler:
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.

Re: Problems with using music properly

Posted: Sun Dec 27, 2009 8:16 pm
by Enjay
I assume that the music file in the music folder is named d_map03.mp3 (or d_map03.lmp, or whatever) ?

Also, it shouldn't make a difference, but the "0" isn't necessary when changing mp3 music

SetMusic ("D_Map03");

should work.

Not sure about the invulnerability thing. I just tried:

Code: Select all

#include "zcommon.acs"

script 1 OPEN
{
SetPlayerProperty (1, 2, PROP_INVULNERABILITY);
}
and the player was definitely invulnerable.

With all these things apparently not happening, I'm wondering, are you sure that your scripts are still compiling and being saved to the WAD?

Re: Problems with using music properly

Posted: Sun Dec 27, 2009 9:01 pm
by ReX
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.

Re: Problems with using music properly

Posted: Sun Dec 27, 2009 9:15 pm
by Enjay
ReX wrote:Does it matter if they are capitalized?
It shouldn't do, no.

Re: Problems with using music properly

Posted: Tue Dec 29, 2009 9:33 am
by ReX
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.]

Re: Problems with using music properly

Posted: Wed Dec 30, 2009 7:17 am
by Enjay
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.