Simple Script Question


(CrazedFan) #1

My endgame event is not finding “game_manager”. I’ve check to make sure everything is closed and I am confident everything is.

What am I missing?

// ..............................................................................................
//	MAP: 	Greenlee_ET
//	BSP: 	Greenlee_ET
//	AUTHOR: Aaron J. Greenlee (greenlee@elevatedgaming.com)
//	WEB:	http://www.elevatedgaming.com
// ..............................................................................................
game_manager
{
	spawn
	{
		// GAME RULES
		wm_axis_respawntime		20
		wm_allied_respawntime	20
		wm_number_of_objectives 8
		wm_set_round_timelimit	30
		
		wait 100
		wm_announce	"Elevated Transport: By Aaron J. Greenlee"
		wm_announce	"http://www.elevatedgaming.com"
		
		// OBJECTIVES
        //wm_objective_status <objective> <team (0=Axis, 1=Allies)> <status (0=neutral 1=complete 2=failed)>

        // 1: Blow Center Complex Main Door
		wm_objective_status 1 1 0
		wm_objective_status 1 0 0

        // 2: BLOW SIDE WALL
		wm_objective_status 2 1 0
		wm_objective_status 2 0 0

        // 3: ALLY CMD POST
		wm_objective_status 3 1 0
		wm_objective_status 3 0 0
        
		// 4: AXIS CMD POST
		wm_objective_status 4 1 0
		wm_objective_status 4 0 0

        // 2: END GAME / TRAM MOVED ALL THE WAY
		wm_objective_status 5 1 0
		wm_objective_status 5 0 0
				
		setautospawn	"Central Complex"	0
		setautospawn	"Allied Spawn"		1

		// Stopwatch mode defending team (0=Axis, 1=Allies) (source: radar)
		wm_set_defending_team	0

		// Winner on expiration of round timer (0=Axis, 1=Allies) (source: radar)
		wm_setwinner	0

                wait 1000

                wm_addteamvoiceannounce 0 "radar_axis_radars_defend"
                wm_addteamvoiceannounce 1 "radar_axis_radars_defend"
	}
	
	trigger checkgame
	{
		
		wm_setwinner 1
		wait 1000
		wm_endround
	}
}

lovenest
{
	trigger run
	{
		wm_announce "You've found my hidden love nest! Please don't tell anyone."
	}
}

fan01
{
	spawn
	{
		wait 50
		setrotation	-300 0 0
	}
}

fan02
{
	spawn
	{
		wait 30
		setrotation	-300 0 0
	}
}

// FORWARD SPAWN

forwardspawnblue
{
	spawn
	{
		// accum 0 set 0			// Who owns flag: 0-Axis, 1-Allied
		setstate forwardspawnblue invisible 
	}

	trigger force_allied
	{
		alertentity blue2cp		// Switch command map marker
		alertentity bluecp2spawn		// Switch all spawnpoints
		setautospawn "Allied Forward"	1	// Set Allies to forward spawn
	}
	trigger kill
	{
		remove				// Remove self (flag model)
	}
}

forwardspawnred
{
	spawn
	{
		// accum 0 set 0			// Who owns flag: 0-Axis, 1-Allied
		setstate forwardspawnred invisible
	}

	trigger force_axis
	{
		alertentity red2cp		// Switch command map marker
		alertentity redcp2spawn		// Switch all spawnpoints
		setautospawn "Axis Forward"	0	// Set Allies to forward spawn
	}
	trigger kill
	{
		remove				// Remove self (flag model)
	}
}

// BLOW CODE


objdoor
{
	spawn
	{
		wait 200
		constructible_class 3
	}

	death
	{
		wm_announce "Allies have breached the Center Complex"

		wm_objective_status 	1 0 2
		wm_objective_status 	1 1 1

		wm_set_main_objective	2 0
		wm_set_main_objective	2 1
		
		trigger forwardspawnred force_axis
		trigger forwardspawnblue force_allied
	}
}

objpump
{
	spawn
	{
		wait 200
		constructible_class 3
	}

	death
	{
		trigger game_manager checkgame
		
		wm_announce "Allies have Won!"

		wm_objective_status 	5 0 2
		wm_objective_status 	5 1 1
		
	}
}

objwall
{
	spawn
	{
		wait 200
		constructible_class 3
	}

	death
	{
		wm_announce "Allies have breached sidewall protecting the oil processing area"

		wm_objective_status 	2 0 2
		wm_objective_status 	2 1 1

		wm_set_main_objective	3 0
		wm_set_main_objective	3 1
	}
}


// ================================================
// ============ NEUTRAL COMMAND POST ==============
// ================================================
// FROM GOldRush Thx SD!!! prefab by seven 2003 

allied_compost_built
{
	spawn
	{
		wait 400
		trigger allied_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0
	}

	buildstart final
	{
		setstate allied_compost_built_model underconstruction
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate allied_compost_built_model default
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible

		trigger allied_compost_built_model enable_allied_features

		enablespeaker allies_compost_sound
	}

	decayed final
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default

		trigger allied_compost_built_model disable_allied_features

		disablespeaker allies_compost_sound
	}
}

allied_compost_built_model
{
	spawn
	{
		wait 400
		setstate allied_compost_built_model invisible
	}

	trigger enable_allied_features
	{
		setchargetimefactor 1 soldier 0.75
		setchargetimefactor 1 lieutenant 0.75
		setchargetimefactor 1 medic 0.75
		setchargetimefactor 1 engineer 0.75
		setchargetimefactor 1 covertops 0.75
		sethqstatus 1 1

		wm_announce	"Allied Command Post constructed. Charge speed increased!"

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed"

		wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 6 0 2
		wm_objective_status 6 1 1
	}

	trigger disable_allied_features
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0

		wm_announce	"Axis team has destroyed the Allied Command Post!"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_construct"

		wm_teamvoiceannounce 1 "allies_hq_compost_damaged"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 6 0 0
		wm_objective_status 6 1 0
	}
}

axis_compost_built
{
	spawn
	{
		wait 400
		trigger axis_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0
	}

	buildstart final
	{
		setstate axis_compost_built_model underconstruction
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate axis_compost_built_model default
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible

		trigger axis_compost_built_model enable_axis_features

		enablespeaker axis_compost_sound
	}

	decayed final
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default

		trigger axis_compost_built_model disable_axis_features

		disablespeaker axis_compost_sound
	}
}

axis_compost_built_model
{
	spawn
	{
		wait 400
		setstate axis_compost_built_model invisible
	}

	trigger enable_axis_features
	{
		setchargetimefactor 0 soldier 0.75
		setchargetimefactor 0 lieutenant 0.75
		setchargetimefactor 0 medic 0.75
		setchargetimefactor 0 engineer 0.75
		setchargetimefactor 0 covertops 0.75
		sethqstatus 0 1

		wm_announce	"Axis Command Post constructed. Charge speed increased!"

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis"

		wm_removeteamvoiceannounce 0 "axis_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 7 0 1
		wm_objective_status 7 1 2
	}

	trigger disable_axis_features
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0

		wm_announce	"Allied team has destroyed the Axis Command Post!"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_damaged"

		wm_teamvoiceannounce 1 "allies_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 7 0 0
		wm_objective_status 7 1 0
	}
}

Thank you.


(Ifurita) #2

Does everything else work? Is objpump actually the scriptname key in whatever is supposed to blow up?


(Shaderman) #3

Maybe the script_multiplayer entity is missing?


(CrazedFan) #4

Oh no. Everything else works and the objpump is executed because I see the consel statement that the Allies won.

Could I be missing something more?

Thanks.


(nUllSkillZ) #5

Do you have a “trigger_objective_info”-entity surrounding/targetting your “func_explosive”-entity?


(Loffy) #6

wm_number_of_objectives 8, but the highest wm_objective_status I see is 5.


(CrazedFan) #7

Silly error. Shaderman was correct. Somehow my script_multiplayer was deleted.

All is well.

Thank you.