Sto
Should i code today ...
I want to generate some barbarian stationnary units Through a map script (So i can't do a special promotion for that or set move=0 into unit xml ) .
The only way i found to do that is to set the UnitAIType to ICBM :
I played about 20 turns and all seems to go well : the barbarian units don't move even if you put a worker near them or if your culture include them .
My question is :
Does the UnitAIType is permanently ? (or AI may change it at every moment)
Does that may create bugs ? (setting a combat melee unit the UnitAITypes.UNITAI_ICBM may make anything else to stop working or bug)
I don't know anything about UnitAIType , I would appreciate if someone can explain me what append with that example , or where this is implemented ?
Thanks !
The only way i found to do that is to set the UnitAIType to ICBM :
Code:
unit=gc.getPlayer(gc.getBARBARIAN_PLAYER()).initUnit(gc.getInfoTypeForString("UNIT_TRUC"), dx, dy, UnitAITypes.NO_UNITAI)
unit.setUnitAIType(UnitAITypes.UNITAI_ICBM)
I played about 20 turns and all seems to go well : the barbarian units don't move even if you put a worker near them or if your culture include them .
My question is :
Does the UnitAIType is permanently ? (or AI may change it at every moment)
Does that may create bugs ? (setting a combat melee unit the UnitAITypes.UNITAI_ICBM may make anything else to stop working or bug)
I don't know anything about UnitAIType , I would appreciate if someone can explain me what append with that example , or where this is implemented ?
Thanks !