- Joined
- Feb 2, 2006
- Messages
- 1,692
Hi,
in my map I want to add the possibility to disable AI for AI players, so allied user players with shared control can control the AI completely without any automatic AI orders.
In the beginning an AI script with several loops is started.
An attack loop and a loop where gold and lumber workers are set.
I added the following possibilities:
Even when using all these commands players have reported to me that the AI still sends back their units to their base automatically.
How can I make the AI stop doing anything?
My feeling is that these functions from common.ai might cause the issue since I did not add any "disabled" flag check here:
I wonder what the point of PauseCompAI is.
in my map I want to add the possibility to disable AI for AI players, so allied user players with shared control can control the AI completely without any automatic AI orders.
In the beginning an AI script with several loops is started.
An attack loop and a loop where gold and lumber workers are set.
I added the following possibilities:
- Chat command "-aioff X": Disables the AI for player X. Uses
from common.j. It also disables the attack loop and set worker loop actions in the AI script by setting a boolean flag which is checked.JASS:
PauseCompAI - Chat command "-aiignore": Makes the AI ignore all selected units. Uses
orJASS:
RemoveGuardPositionfrom common.j.JASS:RemoveAllGuardPositions - Chat command "-ainone X": Changes the player controller of player X to NONE. Uses
from common.j.JASS:
SetPlayerController
Even when using all these commands players have reported to me that the AI still sends back their units to their base automatically.
How can I make the AI stop doing anything?
My feeling is that these functions from common.ai might cause the issue since I did not add any "disabled" flag check here:
JASS:
function CampaignBasics takes nothing returns nothing
call Sleep(1)
call CampaignBasicsA()
call StaggerSleep(1,5)
loop
call CampaignBasicsA()
call Sleep(campaign_basics_speed)
endloop
endfunction
function BuildLoop takes nothing returns nothing
call OneBuildLoop()
call StaggerSleep(1,2)
loop
call OneBuildLoop()
call Sleep(2)
endloop
endfunction
I wonder what the point of PauseCompAI is.



