I've been following a lot of posts similar to this but this issue hasn't quite been addressed. With help from soulwhip, (http://www.sc2mapster.com/maps/bridgetest/files/6-lobby-template-sc2map/), I've written my own functions to set up towns using custom points and spawning starting units there. Unfortunately it has some unintended consequences when you are playing with Computer players. You can spawn a starting town anywhere, but the AI still makes checks to the original Start Location that is assigned to them when the game is created. Looking through the AI scripts, I've found numerous calls to the native function:
"native point PlayerStartLocation (int inPlayer);"
The AI uses the returned value for initializing their town and for checking to see if any opposing Start Locations are on an island, and if so, they will begin an air-based build. I could modify this script to call one of my own functions, returning my own start locations, but I would have to do so at each point in the script where the original is called, and it is called at least 20 times. This is a little messy and I don't want to have to hack the script for every map I make, and I was hoping I could find a way to just find and modify the Start Location that "PlayerStartLocation()" references and returns. Is it even remotely possible to dig this deep into the bowels of a map? Once the game starts it seems its locked in stone.
I also would like to know if this is possible.
As a workaround I tried to move a start location on runtime, but it doesn't seem to work too.
It really looks like they are hard integrated into the map.
I've been following a lot of posts similar to this but this issue hasn't quite been addressed. With help from soulwhip, (http://www.sc2mapster.com/maps/bridgetest/files/6-lobby-template-sc2map/), I've written my own functions to set up towns using custom points and spawning starting units there. Unfortunately it has some unintended consequences when you are playing with Computer players. You can spawn a starting town anywhere, but the AI still makes checks to the original Start Location that is assigned to them when the game is created. Looking through the AI scripts, I've found numerous calls to the native function:
"native point PlayerStartLocation (int inPlayer);"
The AI uses the returned value for initializing their town and for checking to see if any opposing Start Locations are on an island, and if so, they will begin an air-based build. I could modify this script to call one of my own functions, returning my own start locations, but I would have to do so at each point in the script where the original is called, and it is called at least 20 times. This is a little messy and I don't want to have to hack the script for every map I make, and I was hoping I could find a way to just find and modify the Start Location that "PlayerStartLocation()" references and returns. Is it even remotely possible to dig this deep into the bowels of a map? Once the game starts it seems its locked in stone.
@AceofCakes: Go
I also would like to know if this is possible. As a workaround I tried to move a start location on runtime, but it doesn't seem to work too. It really looks like they are hard integrated into the map.
Yeah you can move the start locations at map initialization but it would seem that players aren't tied to these start locations by reference :(