Startup Scripting Problem...


(MrLego) #1

I am having a problem with disabling command post sounds.

When I construct my command post during a normal round, the command post sounds are disabled and when I build it they work correctly.

If I build the command post during warmup the sounds (allied or axis) continue to play once the round is started, even though the command post is unbuilt. The sound remains looped on until the command post is built by either team and then the current owner’s sound is played as it should.

Below is my startup script - note the the “disablespeaker” commands in the spawn section.

Any ideas? :???:


game_manager
{
	spawn
	{
	// 	Set game parameters
		wm_set_round_timelimit	15
		wm_axis_respawntime		5
		wm_allied_respawntime	5
	 	wm_number_of_objectives	1


	// 	0 = Axis control objective at the start
	// 	1 = Allies control objective at the start
	// -1 = Nobody controls objective at the start

	//  Set objective #1 properties
		wm_objective_status 1 0 0
		wm_objective_status 1 1 0

	// 	start triggered loops on/off as required (eg: command post radio sounds)
		disablespeaker allies_compost_sound
		disablespeaker axis_compost_sound

		wait 2000

	// 	Command Post messages
		wm_teamvoiceannounce 0 "axis_hq_compost_construct"
		wm_teamvoiceannounce 1 "allies_hq_compost_construct"

	// end of spawn
	}
	// end of game manager
}


(Menzel) #2

Hi Lego,

I ran into this too but I cant remember which of these two fixed the problem.

1.Verify that the speakers are set to looped off by default with /editspeakers.
2. If that doesn’t fix it you can try adding a wait <value> before calling the disablespeaker commands in the script if you still see problems. Looking at some of the stock scripts I saw waits in the startup sections with various values, several maps do have wait statements before calling the disablespeaker commands, give that a shot.


(sock) #3

Move the disable sound commands to below the wait command. That should fix it.

Sock
:moo:


(MrLego) #4

Moving the wait command before the disable speakers command did the trick.

Thanks to both of you for the help.


(Theisy) #5

How do you build during warm up :???:


(MrLego) #6

Other than picking up documents or gold, I don’t know of anything that cannot be built (or destroyed) in warmup.

In the map Oasis you can build the command post, build the pumps, blow the wall and guns before the game clock has actually begun, provided you didn’t “ready up”.

\g_gametype 2
\devmap oasis

That’s what I meant by warmup.