just 5 and just 3, however I would recommend using:
UnitAITypes.UNITAI_ATTACK_CITY
DirectionTypes.DIRECTION_SOUTHEAST
both for your own reference and incase I am wrong and you can't use ints
also you don't need to say iNorthKorea = -1 and the initUnit should be at the same indentation as pNorthKorea is defined otherwise there is nothing there if the if statement says false. Also I don't think you need to say pNewUnit = pNorthKorea.initUnit(...) you can just say pNorthKorea.initUnit()
the API also says this:
CyUnit initUnit (UnitType iIndex, INT iX, INT iY, UnitAIType eUnitAI, DirectionType eFacingDirection)
CyUnit* initUnit(UnitTypes iIndex, plotX, plotY, UnitAITypes iIndex) - place Unit at X,Y
NOTE: Always use UnitAITypes.NO_UNITAI
I am pretty sure that is wrong as we have used other ai before... suggestions from plat, the_J. is the API wrong?
edit:
here is the code as I see it:
Code:
iKoreaUnitX = 15
iKoreaUnitY = 29
## Korean War Start ##
if CyMap().getMapScriptName() =="Korean War.CivBeyondSwordWBSave":
if iGameTurn == 8:
for iPlayerX in range(gc.getMAX_CIV_PLAYERS()):
pPlayerX = gc.getPlayer(iPlayerX)
if pPlayerX.isAlive():
if pPlayerX.getCivilizationType() == gc.getInfoTypeForString("CIVILIZATION_NORTH_KOREA"):
iNorthKorea = pPlayerX.getTeam()
pNorthKorea = gc.getPlayer(gc.getTeam(iNorthKorea).getLeaderID())
pNorthKorea.initUnit(gc.getInfoTypeForString("UNIT_INFANTRY"), iKoreaUnitX, iKoreaUnitY, UnitAITypes.UNITAI_ATTACK_CITY, DirectionTypes.DIRECTION_SOUTHEAST)
## Korean War End ##
note I defined iKoreaUnitX and iKoreaUnitY for convience define them where appropriate or not at all if you wish (and replace with original numbers in code