doEspionageMission question

Horatius

Prince
Joined
Sep 30, 2006
Messages
579
If one uses: (EspionageMissionType eMission, PlayerType eTargetPlayer, CyPlot pPlot, INT iExtraData, CyUnit pUnit) will the game remove the proper amount of EP pts from the player?

Also, can one show me one example of how to use such a command?
I tried using something like:
Spoiler :
for pUnit in apUnitList:
if pUnit.getUnitCombatType() == gc.getInfoTypeForString('UNITCOMBAT_SPY'):
pPlot = pUnit.plot()
if pPlot.isCity():
pPlayer.doEspionageMission(gc.getInfoTypeForString('ESPIONAGEMISSION_COUNTERESPIONAGE'), gc.getPlayer(pPlot.getOwner()), pPlot, 0, pUnit)


There's a typeError:this constructor takes no argument. So, with my meager python knowledge I don't know how to make it work.
Thanks for any help.
 
It will deduct the EP which is why I told you this function can work only when the situation allows it.
The unit itself however, does not execute the mission.
 
It will deduct the EP which is why I told you this function can work only when the situation allows it.
The unit itself however, does not execute the mission.

I'm understanding, I did try it with enough EP pts, but the above code still causes the type error.
 
Simple example...
Code:
gc.getPlayer(0).doEspionageMission(11, 1, gc.getPlayer(1).getCapitalCity().plot(), 0, CyUnit())
 
Yes, I nailed it.
I just needed one example and I quickly realized what I was doing wrong.

Curiously enough, you can do a spy mission on someone and discount the required EP pts from another different player with such command.

Anyway, I needed to get this right to make the AI do a specific espionage mission that always refused to do in a certain mod (a convert city mission). Now it will under certain conditions and the game should become more interesting.

Platyping, you saved my day. Thank you very much for your time and cheers:goodjob:
 
Back
Top Bottom