Page MenuHomeFeedback Tracker

disableAI "ALL" does nothing
New, NormalPublic

Description

The command disableAI "ALL" does nothing.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Place player on the map
Place unit named bob
Run this script:

test = [] spawn {
	sleep 3;

	bob domove getposatl player;
	systemchat "Move";
	sleep 3;

	systemchat "AI disabled";
	bob disableAI "ALL";
	sleep 3;

	bob enableAI "ALL";
	systemchat "AI enabled";
	sleep 3;

	systemchat "AI disabled";
	bob disableAI "ALL"
};

Observe how the unit just continues running on current devbranch 1.77.142584

Event Timeline

dedmen added a subscriber: dedmen.Sep 11 2017, 12:36 PM

disableAI "ALL" Disables the AI. The AI won't make the decision to move by itself.
But if he is currently moving. He won't stop until you execute doStop.
disableAI just prevents future thought processes. The current through process is already done and it's executing it's decision.