Scripting errors - driving me nuts


(Ifurita) #1

This is driving me nuts and I can’t figure out what is wrong. The last two entities in the script (CP and constructible) aren’t working correctly and I think it’s a scripting problem, but can’t figure out where I’m screwing up. It’s probably something really basic, I just can’t find the error.

  1. Command post (this is a prefab and script I copied from another map, and have used successfully before)
  • spawns with the allied built model overlaid on top of the closed cabinet
  • Allied cannot build CP
  • Axis can build CP, and proper axis built model shows when completed w/ proper in-game messages
  1. Constructible barrier
  • cannot setstate _materials invisible
  • Axis can build fence and materials will disappear when done
  • Allies cannot destroy fence - game locks up with the following error " cl_parseservermessage; illegible server message 0"

I’m thinking it’s a scripting problem because 1) I’ve used the entities successfully in other maps, 2) the same problem occurs even when I copy the CP entity from various maps, 3) it coincidentally affects the last 2 entities in the script, 4) most of the problems happen to be Alllied in nature.

Any thoughts?


//Map script for [mapname] by Vitriol
//Command post prefab by Seven_DC, CP spawn scripting by Mean Mr. Mustard

game_manager
	{
	spawn
		{
		accum 1 set 0

		//spawntimes & round length
		wm_axis_respawntime 5
		wm_allied_respawntime 5
		wm_number_of_objectives 2
		wm_set_round_timelimit 30

		//objectives
		//1 lunchbox
		//2 fakewall

		//current main objectives for both teams (0=axis, 1= allies)

		wm_set_main_objective 1 0
		wm_set_main_objective 1 1

		//objective overview status indicators
		//wm_objective_status <objective> <team (0=axis, 1=allies)> <status 0=neutral 1=complete 2=failed)>

		wm_objective_status 1 1 0
		wm_objective_status 1 0 0
		wm_objective_status 2 1 0
		wm_objective_status 2 0 0

		//stopwatch mode defending team (0=axis, 1=allies)
		wm_set_defending_team 0

		//if the round time expires, the axis have won, so set the current winning team
		//set round winner (axis=0, allies=1)
		wm_setwinner 0

		wait 2000
		}

	trigger objective_counter
		{
		accum 1 inc 1
		trigger game_manager checkgame
		}

	trigger checkgame
		{
		accum 1 abort_if_not_equal 1
		wm_setwinner 0



		wm_endround
		}
	}

//End of game_manager section

//Gold
	allied_gold
	{
		spawn
		{
			wait 200
			setstate allied_gold_captured invisible 
		}

		trigger stolen
		{
			setstate allied_gold_cm_marker invisible
		}

		trigger returned
		{
			setstate allied_gold_cm_marker default
		}

		trigger captured
		{
			wm_announce "The Allies have secured the gold"
			setstate allied_gold_red invisible
			setstate allied_gold_captured default

			// *----------------------------------- vo ------------------------------------------*
			wm_teamvoiceannounce 0 "axis_obj_secured"

			wm_teamvoiceannounce 1 "allied_obj_lost"
			// *----------------------------------- vo ------------------------------------------*

			wm_objective_status 		1 0 1
			wm_objective_status 		1 1 2
		}
	}

	allied_objectives  
	{	
	death
		{
			trigger game_manager objective_counter
		}
	}

wall_1
{	
	spawn

	{
		wait 200
		constructible_class 3
	}

	death
	
	{
		wm_announce "Allies have breached the fake wall"

		wm_objective_status 1 0 1
		wm_objective_status 1 1 2
	}

}

//Constructible Barrier by Gold
dockpad_script
{ 
	spawn 
	{ 
		wait 200 
		constructible_class 2 
		trigger self startup 
	} 

	buildstart final 
	{ 
	} 

	built final 
	{ 
		setstate dockpad_target default 
		setstate dockpad_materials invisible 
		wm_announce "The gold barrier has been built" 
	} 

	decayed final 
	{ 
		trigger self startup 
	} 

	death 
	{
		wm_announce "The Allies have breached the gold barrier 
		setstate dockpad_materials default
		setstate dockpad_target invisible
	} 

	trigger startup 
	{ 
		setstate dockpad_target invisible
		setstate dockpad_materials default 
	} 
}

	
// ============================================================================ 
// 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 allied_cp_speaker
		setstate allied_cp_two	default
		alertentity allied_cp_blob
	}

	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 allied_cp_speaker
		alertentity allied_cp_blob
		setstate allied_cp_two	invisible		
	}
}

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 7 0 2
		wm_objective_status 7 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 7 0 0
		wm_objective_status 7 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_cp_speaker
		setstate axis_cp_two	default
		alertentity axis_cp_blob
	}

	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_cp_speaker
		setstate axis_cp_two	invisible
		alertentity axis_cp_blob
	}
}

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
	}
}

// ============================================================================ 
// Command Post Spawns ========================================================
// ============================================================================ 

allied_cp_two
{
	spawn
	{
		wait 100
		setstate allied_cp_two invisible
	}
}

axis_cp_two
{
	spawn
	{
		wait 100
		setstate axis_cp_two invisible
	}
}


(Java.Lang) #2

The wm_announce message on the death of the construtible barrier is missing an end quote, that will fix your parse message error.

Edit: If you aren’t able to build the Allied CP you have probably forgotten to paste the TOI for it into the map.


(Ifurita) #3

You, my friend, are a fricken genius, and I feel like a total noob. It was that one missing " that was causing all of the problems. Thank you much


(hummer) #4

That reminds me of a joke.

A pirate walks into a bar.The bartender says, “Hey you’ve got a steering wheel in
your crotch.” The pirate says, “Arrrrr it’s driving me nuts.”


(Ifurita) #5

nice to see you around again