Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.
I know Unit:GetUnitAIType() will return UNITAI_EXPLORE for units like the AI starting warrior, but I don't know how to set it as there's no Unit:SetUnitAIType() available from Lua. I don't really know how those are set initially, but it's probably a combination of the Unit_AITypes and Unit_Flavors table entries.
The automated exploration from the Unit Panel seems to use Game.HandleAction(actionID) but since there are no other parameters, that probably only works on the currently selected unit.
if unit ~= nil and unit:GetUnitType() == GameInfo.Units["UNIT_EXPLORER"].ID then
-- The last parameter has to be set to 1 for some reason; 0 didn't work
unit:DoCommand(CommandTypes.COMMAND_AUTOMATE, 1);
end
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.