Problems with using music properly

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Problems with using music properly

Postby ReX » Sun Dec 27, 2009 7:19 pm

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.
User avatar
ReX
Title? I don't need no steenkin' title!
 
Joined: 05 Aug 2003
Location: Quatto's Palace

Re: Problems with using music properly

Postby Enjay » Sun Dec 27, 2009 9:16 pm

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 allExpand view
#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?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
Joined: 15 Jul 2003
Location: Scotland

Re: Problems with using music properly

Postby ReX » Sun Dec 27, 2009 10:01 pm

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.
User avatar
ReX
Title? I don't need no steenkin' title!
 
Joined: 05 Aug 2003
Location: Quatto's Palace

Re: Problems with using music properly

Postby Enjay » Sun Dec 27, 2009 10:15 pm

ReX wrote:Does it matter if they are capitalized?

It shouldn't do, no.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
Joined: 15 Jul 2003
Location: Scotland

Re: Problems with using music properly

Postby ReX » Tue Dec 29, 2009 10:33 am

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.]
User avatar
ReX
Title? I don't need no steenkin' title!
 
Joined: 05 Aug 2003
Location: Quatto's Palace

Re: Problems with using music properly

Postby Enjay » Wed Dec 30, 2009 8:17 am

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.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
Joined: 15 Jul 2003
Location: Scotland


Return to Editing

Who is online

Users browsing this forum: MidoriMan, TheBadHustlex and 1 guest