[B]# My function that creates the new unit :
def CreateNewCiv(pNewPlayer, iX, iY):[/B]
if(pNewPlayer.isPlayable()):
#Create a settler
pFirstGothUnit = pNewPlayer.initUnit(gc.getInfoTypeForString("UNIT_SETTLER"), iX, iY, UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
return
[B]# When a turn begins :
def onBeginGameTurn(self, argsList):[/B]
iGameTurn = argsList
gc = CyGlobalContext()
#TURN 100 : Goths
if(iGameTurn == 100):
#Goths have to starts
pNewPlayer = gc.getPlayer(gc.getInfoTypeForString("CIVILIZATION_GOTHS"))
self.CreateNewCiv(pNewPlayer, 29, 77) # 29 (X) and 77 (Y) are coordonates of the plot where the unit will be created
#TURN 400 : France & Spain
elif(iGameTurn == 400):
#France have to starts
pNewPlayer = gc.getPlayer(gc.getInfoTypeForString("CIVILIZATION_FRANCE"))
self.CreateNewCiv(pNewPlayer, 100, 15) # 100 (X) and 15 (Y) are coordonates of the plot where the unit will be created
#Spain have to starts too
pNewPlayer = gc.getPlayer(gc.getInfoTypeForString("CIVILIZATION_SPAIN"))
self.CreateNewCiv(pNewPlayer, 19, 93) # 19 (X) and 93 (Y) are coordonates of the plot where the unit will be created
#TURN ETC, ETC, ETC....
elif(iGameTurn == etc, etc, etc....