- Joined
- Dec 12, 2009
- Messages
- 1,027
I was wondering if any other users know what the player slot status identities are (in JASS). Below is a cut-out from a custom AI script (converted into JASS) that I think is responsible for limiting the AI to computer-controlled players that are in 1-12.
If a player leaves, AI scripts can't run because that player slot is set to user.
Players 13-16 also can't run AI scripts because they can't be assigned to computer players.
My question:
GetPlayerState(ai_player... is where the script is preset to a computer player. What would I need to change that to in order for a script to work for a user (one who left the game or is AFK) & what would I need to change that to for a neutral player (Hostile/Victim/Extra/Passive) to run it? The player state can't be changed in game (constant defined in the lobby apparently) and I use all player slots in my map.
Steps after that would include: How do I import that back into a map?
If this question as answered already please link me to the answer. All of my ideas for search terms proved fruitless...
//\\o0//\\
//===========================================================================
function TotalFoodProduced takes nothing returns integer
return GetPlayerState(ai_player,PLAYER_STATE_RESOURCE_FOOD_CAP)
endfunction
If a player leaves, AI scripts can't run because that player slot is set to user.
Players 13-16 also can't run AI scripts because they can't be assigned to computer players.
My question:
GetPlayerState(ai_player... is where the script is preset to a computer player. What would I need to change that to in order for a script to work for a user (one who left the game or is AFK) & what would I need to change that to for a neutral player (Hostile/Victim/Extra/Passive) to run it? The player state can't be changed in game (constant defined in the lobby apparently) and I use all player slots in my map.
Steps after that would include: How do I import that back into a map?
If this question as answered already please link me to the answer. All of my ideas for search terms proved fruitless...
//\\o0//\\