Grumpy Old Wizard wrote:Othmaar wrote: In addition I believe I read in the documentation that the Human player is always PLAYER_1.
I think that is stated in the editor theory part of the manual, but the documentation is wrong.
My map is a single player map with all 6 positions playable by the human player. Scripting will not work without using PLAYER_2 for blue, PLAYER_2 for green, ect.
GOW
yes, i can confirm that, in the sylvan single map im making i have the human player as green, player 3. so all my references in the script are to player 3. even when i use the @OpenCircleFog command in game, i have to clear fog for player 3.
but when i load my map in the game, i select player 1, which is green not red. and you have to be careful, in my map i have human player3, and computer player 7. i tried to add a new computer player.
i thought dark blue would be a nice color, so i added computer player2.
when i loaded the map, player2 became player1, and human player 3 became player2 and the game instantly crashed upon starting to load.
so the game slides all the players down. if you make a human player anything other than player1, you cant have any computer players below that.
overall in future i think im going to always just pick player 1 red for player 1. it saves alot of confusion, and i suppose you wont have to use the GetPlayer function either. I didnt do that for this map im making since i didnt want red sylvans.
and if you go back to page 8 or 9 of this post, by picking player3 you can see the problems it caused me. i cannot use the GetObjectiveState command. the game cannot find any objectives i have for player3.
it always returns the error, objective not found, i guess since its a singleplayer map, the game looks for objectives in the player1 spot.
which limited the map i made. so another thing to remember is that if you choose anything other than player1 for your map, you wont be able to use the GetObjectiveState function. which is annoying that you always have to have red as the humanplayer.
**edit*** and another problem with selecting a human player other than number 1 is that if you put common objectives, the map will not load. it says player not found.
i just found this out because im trying to figure out how to use the GetObjectiveState function to work with player3 and added a common objective.