- Joined
- Nov 21, 2012
- Messages
- 835
There are player slots sets in Object Editor-->Scenario-->Player Properties to "User".
In game lobby players can occupy these slots or set Computer in it.
If Computer was selected the internal AI script (build-in) interfere with my custom code which suppose to control a hero.
Internal AI casts some spells (howl of terror, storm bolr, etc) also overwrite attack/move commands.
The question is: how to disable build-in AI for computer slot.
Already tried, and these not working:
2nd case
And is there a way to detect open / closed slot in game lobby?
I tried and cannot catch a diffence between those two.
is it posible?
In game lobby players can occupy these slots or set Computer in it.
If Computer was selected the internal AI script (build-in) interfere with my custom code which suppose to control a hero.
Internal AI casts some spells (howl of terror, storm bolr, etc) also overwrite attack/move commands.
The question is: how to disable build-in AI for computer slot.
Already tried, and these not working:
JASS:
call StartCampaignAI( Player(0), "war3mapImported\\AIEmpty.ai" ) //just empy "main" function inside
call PauseCompAI(Player(0), true) //runs at ~20sec of the game time
call CustomDefeatBJ( Player(0), "defeat!" ) //runs at ~20sec of the game time
2nd case
And is there a way to detect open / closed slot in game lobby?
I tried and cannot catch a diffence between those two.
JASS:
// "user" --> MAP_CONTROL_USER and PLAYER_SLOT_STATE_PLAYING
// "comp" --> MAP_CONTROL_COMPUTER and PLAYER_SLOT_STATE_PLAYING
// "open" --> MAP_CONTROL_USER and PLAYER_SLOT_STATE_EMPTY
// "close" --> MAP_CONTROL_USER and PLAYER_SLOT_STATE_EMPTY