Messages with python

1) Check if city is coastal, which you already know how to do.
2) If yes, ignore. If no, check if city is along a river.
3) If yes, ignore, if no destroy.

Code:
pPlot = pCity.plot()
if pPlot.isRiver():
 
You getting pretty good at python already :D
You can refer to the python API for more functions and I believe you can write your own codes with enough practices.

Gigapack has working examples for most of the codes anyway, so if you are unsure how a code is supposed to be used, you can use ctrl F to see if there is a working example.
Trial and error is fun :D

For this river and coastal stuff, you can combine them with an AND if you like.
If non coastal AND no river, destroy.
Or you can just leave it alone as 2 if statements, no harm done.
 
Thanks for the hint to the API. I just discovered it a week ago, but for me it´s still confusing. Not so much as it would have been a few weeks or months ago, but you´re right. For many of them I surely can find examples. I´ll try and will surely get some errors to fix. That will be fun, IF I can fix them.:)
 
Back
Top Bottom