triggered spawn point change script help req.


(mrfin) #1

Hello Mapping Types

ok…the scripting for spawnpoints is what I need a little help with.

I have set up all the required entities for the maps spawns: twos - yellow blobs, player spawnpoints etc, given them descriptions, scriptnames etc.
and they all work fine. Where I’m coming unstcuck is scripting in the change of spawn locations.

I need to move the allied autospawn from the first forward spawn (forward_wobj0) location to the next. So… I’ve setstate the TWO of the second point (“forward_wobj”)to default from invisible, called on it to become active with alertentity and hidden the axis spawns at this location. I’ve also hidden the first allied spawn blob and the allied spawns

Trouble is that when the change is triggered the allies don’t spawn at the new location and the flag appears as axis on the cm.

Here are the initial spawn settings at the game start:

	setautospawn 	"The House"			0
	setautospawn 	"The Mill Tunnel"		1

	wait 2000
	
	/////initial flag setstate attempts/////

	setstate forward_wobj invisible

	setstate mill_tunnel_axis_spawns invisible
	setstate forwardspawn0 invisible

	setstate boathouse_axis_spawns invisible
	setstate boathouse_allied_spawns invisible
	setstate forwardspawn invisible

	setstate house_allied_spawns invisible
	setstate forwardspawn2 invisible

	setstate forwardspawn3 invisible
	setstate forward_wobj3 invisible
	setstate Tunnel3_axis_spawns invisible
	setstate Tunnel3_allied_spawns invisible

Here is the attempted scripting for the change which is triggered by a script movers location:

trigger run_9
{
	accum 1 bitset 2
	followspline 0 tspln_9 256 wait length 304
	accum 1 bitreset 2

	setstate forward_wobj0 invisible
	setstate mill_tunnel_allied_spawns invisible

	setstate forward_wobj default
	alertentity forward_wobj
	setstate boathouse_axis_spawns invisible 
	
	setautospawn 	"The House"			0
	setautospawn 	"The Boathouse"		1
	
	accum 3 set 9
	trigger truck run_continue 

}

Any ideas where I’m going off the rails? or have I ever been on the rails - am I going about this in totally the wrong way?!
Thanks in adv. for any help and plz. excuse dimmness


(Ifurita) #2

The first thing I’d check is whether your forward flag is checked default allies or default axis. Alertentity doesn’t necessarily activate a spawn, it toggles the nature of an entity. So, if the TWO was allied, then the alertentity toggles it to axis.


(mrfin) #3

thanks ifurita

alertentity toggling fixed the cm flag

The allies are still spawning at the first spawn point (forward_wobj0) even though it has been set as invisible and the setautospawn has been set to the next waypoint “The Boathouse”

any more ideas?


(EB) #4

setstate forward_wobj default
alertentity forward_wobj
setstate boathouse_axis_spawns invisible

Well, this seems peculiar…you setstate the wobj default but then change it’s default team. I think you have it default allies but when you alert it, you change it to axis…although there, the axis spawns are invisible.
That part looks really funny.

Removing the alertentity partion in this peice of script should fix it unless I am envisioning a diff. situation.


(Ifurita) #5

Try setstating the spawnpoints invisible AS WELL as the Team_wolf_objective. In the example map I link you to, I didn’t have to setstate my spawnpoints invisible because the map is linear where as your map is organized as a circle, which might be causing your setautospawn to return some silly results. Just a hypothesis


(mrfin) #6

thanks both

ok…question is how do i make the player spawns visible again once they have been setstate invisible?


(EB) #7

setstate them default