Help with a short script


(c0caine) #1

I’ve created a map for enemy territory and the only problem with it is the script not working etc.
Right now it’s saying that: “line 46 unknown action: spawn”
Please help.


game_manager
{
	spawn
	{
			wm_axis_respawntime	10
			wm_allied_respawntime	10
			wm_set_round_timelimit	30
			wm_number_of_objectives 1
	
			// Stopwatch mode defending team (0=Axis, 1=Allies)
			wm_set_defending_team	0
	
			// Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)
			wm_setwinner 0
	
			wait 500
			// Objectives
			// 1 Primary Objective: Allies destroy main entrance
			// obj nbr, team, status (0=none, 1=passed, 2=failed)
			wm_objective_status 1 0 0
			wm_objective_status 1 1 0
	
	
			setautospawn "Axis Spawn" 0
			setautospawn "Allied Spawn" 1
	
			wm_teamvoiceannounce 0 "radar_axis_entrance1_stop"
			wm_teamvoiceannounce 1 "radar_allies_entrance1_destroy"
			wm_addteamvoiceannounce 0 "radar_axis_entrance1_stop"
			wm_addteamvoiceannounce 1 "radar_allies_entrance1_destroy"
		}
trigger allies_win	 
		{
			wm_announce "The Allies have destroyed the power supply!"
	
			wm_setwinner 1
	
			wait 3000
	
			wm_endround

	}


allied_destructible
	{
		spawn
		{
			wait 300
			constructible_class 3 // 2=satchel  3=dyna
		}
	
		death
		{
			alertentity allied_destructible_bits
			trigger allied_destructible_toi remove
			wm_objective_status 1 0 2
			wm_objective_status 1 1 1
			trigger game_manager allies_win
	
	
			wm_announce "The Allies have blown the entrance !"
			wm_removeteamvoiceannounce 0 "radar_axis_entrance1_stop"
			wm_removeteamvoiceannounce 1 "radar_allies_entrance1_destroy"
	
		}
	}
	
allied_destructible_toi
	{
		trigger remove
		{
			remove
		}
	}




power_supply
	{
		spawn
		{
			wait 300
			constructible_class 3 // 2=satchel  3=dyna
		}
	
		death
		{
			alertentity power_supply_bits
			trigger power_supply_toi remove
	
			wm_announce "The Allies have destroyed the Axis Power Supply!"
			trigger game_manager allies_win
		}
	}
power_supply_toi
	{
		trigger remove
		{
			remove
		}
	}


alliedconstruct_n
	{
		spawn
		{
			wait 50
			trigger self setup
			constructible_class	2	// 2=Satchel 3=Dyna
		}
	
		trigger setup
		{
			setstate alliedconstruct_n_materials default	// Crate Models
			setstate alliedconstruct_n_clip default		// Clip brushes
			setstate alliedconstruct_n_flag default
		}
	
		built final
		{
			setstate alliedconstruct_n_materials invisible	// Crate Models
			setstate alliedconstruct_n_clip invisible	// Clip brushes
			setstate alliedconstruct_n_flag invisible
	
			wm_announce "Allied Team have built the ladder!"
		}
	
		decayed final
		{
			trigger self setup
		}
	
		death
		{
			trigger self setup
			wm_announce "Axis have destroyed ladder!" 
		}
	}
}


(UJERebel) #2

I think you just forgot a “}” so it doest start a new spawn block.

i dont have much time to check now, maybe further in the evening…

srry

Byyyee

Rebel


(Qualmi) #3

your allied_destructible is an entity. it needs its own scriptblock. like this:


game_manager
{
	spawn
	{
			wm_axis_respawntime	10
			wm_allied_respawntime	10
			wm_set_round_timelimit	30
			wm_number_of_objectives 1
	
			// Stopwatch mode defending team (0=Axis, 1=Allies)
			wm_set_defending_team	0
	
			// Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)
			wm_setwinner 0
	
			wait 500
			// Objectives
			// 1 Primary Objective: Allies destroy main entrance
			// obj nbr, team, status (0=none, 1=passed, 2=failed)
			wm_objective_status 1 0 0
			wm_objective_status 1 1 0
	
	
			setautospawn "Axis Spawn" 0
			setautospawn "Allied Spawn" 1
	
			wm_teamvoiceannounce 0 "radar_axis_entrance1_stop"
			wm_teamvoiceannounce 1 "radar_allies_entrance1_destroy"
			wm_addteamvoiceannounce 0 "radar_axis_entrance1_stop"
			wm_addteamvoiceannounce 1 "radar_allies_entrance1_destroy"
		}
                trigger allies_win	 
		{
			wm_announce "The Allies have destroyed the power supply!"
	
			wm_setwinner 1
	
			wait 3000
	
			wm_endround

	               }
}


allied_destructible
	{
		spawn
		{
			wait 300
			constructible_class 3 // 2=satchel  3=dyna
		}
	
		death
		{
			alertentity allied_destructible_bits
			trigger allied_destructible_toi remove
			wm_objective_status 1 0 2
			wm_objective_status 1 1 1
			trigger game_manager allies_win
	
	
			wm_announce "The Allies have blown the entrance !"
			wm_removeteamvoiceannounce 0 "radar_axis_entrance1_stop"
			wm_removeteamvoiceannounce 1 "radar_allies_entrance1_destroy"
	
		}
	}
	
allied_destructible_toi
	{
		trigger remove
		{
			remove
		}
	}




power_supply
	{
		spawn
		{
			wait 300
			constructible_class 3 // 2=satchel  3=dyna
		}
	
		death
		{
			alertentity power_supply_bits
			trigger power_supply_toi remove
	
			wm_announce "The Allies have destroyed the Axis Power Supply!"
			trigger game_manager allies_win
		}
	}
power_supply_toi
	{
		trigger remove
		{
			remove
		}
	}


alliedconstruct_n
	{
		spawn
		{
			wait 50
			trigger self setup
			constructible_class	2	// 2=Satchel 3=Dyna
		}
	
		trigger setup
		{
			setstate alliedconstruct_n_materials default	// Crate Models
			setstate alliedconstruct_n_clip default		// Clip brushes
			setstate alliedconstruct_n_flag default
		}
	
		built final
		{
			setstate alliedconstruct_n_materials invisible	// Crate Models
			setstate alliedconstruct_n_clip invisible	// Clip brushes
			setstate alliedconstruct_n_flag invisible
	
			wm_announce "Allied Team have built the ladder!"
		}
	
		decayed final
		{
			trigger self setup
		}
	
		death
		{
			trigger self setup
			wm_announce "Axis have destroyed ladder!" 
		}
	}

doesnt belong in the game_manager block. in there can only be predefined game events like spawn or trigger blocks.

if you find anything wrong let me know. i only had a quick look on it.

you still might get errors, depends…


(c0caine) #4

[QUOTE=Qualmi;200812]your allied_destructible is an entity. it needs its own scriptblock. like this:


game_manager
{
	spawn
	{
			wm_axis_respawntime	10
			wm_allied_respawntime	10
			wm_set_round_timelimit	30
			wm_number_of_objectives 1
	
			// Stopwatch mode defending team (0=Axis, 1=Allies)
			wm_set_defending_team	0
	
			// Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)
			wm_setwinner 0
	
			wait 500
			// Objectives
			// 1 Primary Objective: Allies destroy main entrance
			// obj nbr, team, status (0=none, 1=passed, 2=failed)
			wm_objective_status 1 0 0
			wm_objective_status 1 1 0
	
	
			setautospawn "Axis Spawn" 0
			setautospawn "Allied Spawn" 1
	
			wm_teamvoiceannounce 0 "radar_axis_entrance1_stop"
			wm_teamvoiceannounce 1 "radar_allies_entrance1_destroy"
			wm_addteamvoiceannounce 0 "radar_axis_entrance1_stop"
			wm_addteamvoiceannounce 1 "radar_allies_entrance1_destroy"
		}
                trigger allies_win	 
		{
			wm_announce "The Allies have destroyed the power supply!"
	
			wm_setwinner 1
	
			wait 3000
	
			wm_endround

	               }
}


allied_destructible
	{
		spawn
		{
			wait 300
			constructible_class 3 // 2=satchel  3=dyna
		}
	
		death
		{
			alertentity allied_destructible_bits
			trigger allied_destructible_toi remove
			wm_objective_status 1 0 2
			wm_objective_status 1 1 1
			trigger game_manager allies_win
	
	
			wm_announce "The Allies have blown the entrance !"
			wm_removeteamvoiceannounce 0 "radar_axis_entrance1_stop"
			wm_removeteamvoiceannounce 1 "radar_allies_entrance1_destroy"
	
		}
	}
	
allied_destructible_toi
	{
		trigger remove
		{
			remove
		}
	}




power_supply
	{
		spawn
		{
			wait 300
			constructible_class 3 // 2=satchel  3=dyna
		}
	
		death
		{
			alertentity power_supply_bits
			trigger power_supply_toi remove
	
			wm_announce "The Allies have destroyed the Axis Power Supply!"
			trigger game_manager allies_win
		}
	}
power_supply_toi
	{
		trigger remove
		{
			remove
		}
	}


alliedconstruct_n
	{
		spawn
		{
			wait 50
			trigger self setup
			constructible_class	2	// 2=Satchel 3=Dyna
		}
	
		trigger setup
		{
			setstate alliedconstruct_n_materials default	// Crate Models
			setstate alliedconstruct_n_clip default		// Clip brushes
			setstate alliedconstruct_n_flag default
		}
	
		built final
		{
			setstate alliedconstruct_n_materials invisible	// Crate Models
			setstate alliedconstruct_n_clip invisible	// Clip brushes
			setstate alliedconstruct_n_flag invisible
	
			wm_announce "Allied Team have built the ladder!"
		}
	
		decayed final
		{
			trigger self setup
		}
	
		death
		{
			trigger self setup
			wm_announce "Axis have destroyed ladder!" 
		}
	}

doesnt belong in the game_manager block. in there can only be predefined game events like spawn or trigger blocks.

if you find anything wrong let me know. i only had a quick look on it.

you still might get errors, depends…[/QUOTE]
Yeah, it helped. I did’nt know that the game_manager script {} has to have only spawns or triggers.
Anyway thanks.


(c0caine) #5

One more question - why is my map looking all spotty with shadows?


(shagileo) #6

Well light entities cast shadows when an object is near the entity (well, it’s more the object that casts the shadow actually) . Based on their intensity and radius, you can change both keys and values to alter them to your needs.

Depending what’s in the radius of the light entity, it will cast a shadow of course.
The black spots on your barrels are indeed quite strange. Perhaps a texture problem?


(eiM) #7

if you moved your maps’ coordinates you might need to refresh your lightmaps?
Delete your current lightmapfolder in etmain/maps/YOURMAPNAME and use the /generatetracemap under /devmap

Especially if you packed it into a pk3 to test (which isnt necessarily needed)