View Full Version : [PYTHON] How Do I...


Zebra 9
Jan 03, 2007, 11:57 AM
How do I give a Barb city to another player?
I know how to use Python & I downloaded the API and have read most of it. I just can't seem to figure out how give someone a city without give them a unit.:confused:

Kael
Jan 03, 2007, 12:43 PM
How do I give a Barb city to another player?
I know how to use Python & I downloaded the API and have read most of it. I just can't seem to figure out how give someone a city without give them a unit.:confused:

You probably want the acquireCity CyPlayer python function:

VOID acquireCity(CyCity pCity, BOOL bConquest, BOOL bTrade)
void (CyCity* pCity, bool bConquest, bool bTrade)

As an example:


pPlayer.acquireCity(pCity,false,false)

Zebra 9
Jan 04, 2007, 03:10 PM
pCity is the city to hand over, but what would happen if I set bConquest or bTrade or both of them to true?

Kael
Jan 04, 2007, 03:12 PM
pCity is the city to hand over, but what would happen if I set bConquest or bTrade or both of them to true?

I assume you will kick off any events that are triggering by taking a city in conquest or in trade. For example, if you have bConquest set to true you will probably be given the option to raze the city.

Zebra 9
Jan 04, 2007, 03:38 PM
Ok, great. Thanks Kael.:goodjob: