Seidrik_The_Gray
Aug 08, 2007, 01:18 PM
I am dabbling with modding at the moment, trying to get the hang of the python call backs, etc...
I'm stumped as to how to properly make a python script for pythonCanDo that executes the event only when the civ is for example Greece.
def canDoBlahBlah(arslist):
iEvent = argsList[0]
kTriggeredData = argsList[1]
player = gc.getPlayer(kTriggeredData.ePlayer)
if player.getCiv() != Greek
return false
return true
This seems like the simplist way, but as my first piece of Python scripting, I'm sure I'm missing something here. The idea is to have the canDo return a true value if and only if the civ is the Greeks.
Did I do this right?
I'm stumped as to how to properly make a python script for pythonCanDo that executes the event only when the civ is for example Greece.
def canDoBlahBlah(arslist):
iEvent = argsList[0]
kTriggeredData = argsList[1]
player = gc.getPlayer(kTriggeredData.ePlayer)
if player.getCiv() != Greek
return false
return true
This seems like the simplist way, but as my first piece of Python scripting, I'm sure I'm missing something here. The idea is to have the canDo return a true value if and only if the civ is the Greeks.
Did I do this right?