Interesting possible autospawn bug


(G0-Gerbil) #1

It seems (IE I’ve not fully verified it, but it seemed to be the problem in my current script) that if you want to remove a possible spawn point and set the autospawn elsewhere (eg capturing a flag pushes respawning elsewhere) then you must IN ORDER:

  1. Change the autospawn
  2. Remove the team_WOLF_objective and spawn points

If you do them in the other order, you run a high risk of the autospawn not working properly. EG on helmsdeep, I was removing the south valley spawns and then setting the autospawn to the fort for Allies. However, they stubbornly spawned in the caves!

I believe this is because if the autospawn is set to a team_WOLF_objective, then within the script that setstate invisibles it, any autospawn command for that team will fail to register - hence it must go before.

The reason I think it fails to register as opposed to simply choosing a new, random autospawn is because after removing the south valley flag, neither the fort nor caves spawn flags on the maps had any player count - meaing the just removed south valley spawn flag was still default, despite the setautospawn command registering on the console.

Anyway, just thought I’d point it out in case anyone else has weird spawn fun :slight_smile:


(Vitriol) #2

i’ve been having a similar problem, would you mind posting your script (or a sample one) so i can see exactly what you mean?


(G0-Gerbil) #3

Hiya Vitriol, here is the relevant part of the working version I have now:

		alertentity axis_fort_spawn	// enable axis spawns in fort
		alertentity allied_fort_spawn	// disable allied spawns in fort

		// Set spawn flags on command map
		setautospawn	"Caves"	1
		setstate allied_fort_spawn_marker invisible
		setstate axis_fort_spawn_marker default
		setautospawn	"Fort"	0

The first two lines toggle the actual spawnpoints themselves either making them available or unavailable depending on the team. These lines AREN’T important regarding where they come - just put them in here to emphasise that point :slight_smile:

Then, in the needed order, I change the Allied autospawn.
Next I remove the OLD allied autospawn marker.
Then I make available the NEW axis autospawn marker, before finally setting the Axis autospawn to this location.

The bits that were going wrong was if I swapped the two axis lines around, or the two allied lines. So basically what I got from this was you should NEVER set an autospawn to a currently invisible marker, even if you make it visible in the very next line, and NEVER make invisible a marker if it’s currently an autospawn point, even if you change the autospawn in the very next line.

Worth a try - hope it helps :slight_smile: