g_scripting: setautospawn, couldn't find target


(mrfin) #1

Hello mapping types

g_scripting: setautospawn, couldn’t find target - is the error message I get when I attempt to run my devmap.

I have had a look at some posts about autospawn problems but still can’t get mine to work.

Can someone plz point me in the right direction to sort this out

Thnks in adv. :cool:


(Victorianetza) #2

can u post ur script? at least some part with the spawns part?


(The Wanderer) #3

it’s likely that your team_WOLF_objective is invisible at the start or the description key on it is not set right.


(Mapper X) #4

You have to add an axis an allied autospawn in your script.

I always do it in the game_manager part of my map.

Go take a look to the goldrush script.

Or show us your script.


(Oxygen - o2) #5

no, you give spawns a seperate part of the script, its where they spawn first that the game_manager part should control


(mrfin) #6

ok mappers…thanks for replys

The description keys on my objective entitys are ok…says he confidently…

here is gamemanager part of the script:

game_manager
{
spawn
{

	// Game rules
	wm_axis_respawntime	30
	wm_allied_respawntime	30
	wm_number_of_objectives 7
	wm_set_round_timelimit	30

	// Objectives
	// 1: Steal Truck
	// 2: Protect Truck
	// 3: Steal Train
	// 4: Protect Train
	// 5: Escape with gold
	// 6: Allied command post
	// 7: Axis command post

	// Current main objectives for each team (0=Axis, 1=Allies)
	wm_set_main_objective		1	1
	wm_set_main_objective		1	0

	wm_objective_status 1 1 0
	wm_objective_status 1 0 0
	wm_objective_status 2 1 0
	wm_objective_status 2 0 0
	wm_objective_status 3 1 0
	wm_objective_status 3 0 0
	wm_objective_status 4 1 0
	wm_objective_status 4 0 0
	wm_objective_status 5 1 0
	wm_objective_status 5 0 0
	wm_objective_status 6 0 0
	wm_objective_status 6 1 0
	wm_objective_status 7 0 0
	wm_objective_status 7 1 0

	wm_set_main_objective		1	1
	wm_set_main_objective		1	0

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

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

	wait 500
	setautospawn	"Allies Spawn"	1
	setautospawn	"Axis Spawn"	0

	accum 4 set 0 // have the Axis stolen the truck?
}

trigger axis_win
{
	wm_setwinner	0
	wm_announce "Axis team escaped with the Gold!"

	wm_objective_status 5 0 2
	wm_objective_status 5 1 1

	wait 1500
	wm_endround
}

trigger axis_steal_truck
{
	accum 4 abort_if_not_equal 0

	wm_announce "Axis team has stolen the Truck!"

	wm_objective_status 1 0 2
	wm_objective_status 1 1 1

	alertentity sawmill_axis_spawns
	alertentity sawmill_allied_spawns
	alertentity sawmillblob
	alertentity boathouse_axis_spawns
	alertentity boathouse_allied_spawns
	alertentity boathouseblob

			 
	
	setautospawn	"Allies Spawn"	0
	setautospawn	"Axis Spawn"	1

	accum 4 set 0
	wm_set_main_objective		2	1
	wm_set_main_objective		2	0

	

}

}

Thanks again


(mrfin) #7

it’s likely that your team_WOLF_objective is invisible at the start or the description key on it is not set right.

Start invisible??


(The Wanderer) #8

Check again your team_WOLF_objectives. Look at the goldrush script and .map file for how they’re supposed to look like. Make sure that each team_WOLF_objective has the checkbox for either axis or allies set.

I don’t know your map so I’m not sure how you’re structuring it, but that flipping of the spawn points on your scripts look weird. Are you literally switching the spawn points or have you set the description for all your team_WOLF_objectives the same. The description should be unique for each spawn point as it is used as a string variable by the game. The number parameter of the setautospawn is the team by the way. 0 is axis and 1 is allies.


(mrfin) #9

Thanks Wanderer

The script will be v messy for a while yet while I attempt to work it out - will take some doing for me but I’ll give it a shot.

The map is a linear-ish business and the spawns will need to move along the map.
There will be 4
Just getting the first two to work together would would be nice though.
I want spawns to swap teams when the truck is taken - like goldrush

  • then I will sort out the others to be triggered as the truck moves up the map.
    (at least this is the plan)

What is the last unit in these lines btw:
wm_objective_status 1 1 0

Appreciate the help


(The Wanderer) #10

http://www.planetquake.com/simland/ldr1_1/default.htm

check appendix A: Scripting commands