• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Disable internal AI

Status
Not open for further replies.
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:
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
is it posible?
 

EdgeOfChaos

E

EdgeOfChaos

I have had the same problem and don't believe it is possible. I just handled it by using the internal AI to do what I wanted. There's a list of conditions when AI uses abilities - you can write your abilities with such a base order ID so that they use them in situations when you want it used.

You cannot detect open/closed lobby slot.
 
Status
Not open for further replies.
Top