Python question

cotdamn

Chieftain
Joined
Nov 30, 2005
Messages
50
Hi,

Can anyone post a python code snippet for the following:

Any player X, builds building Y, and gets specific free tech Z, only once.

I need this for Imperialism Mod, and if I am going to release it by the end of the month I could use some help with this, as I am bogged down with the XML stuff.

Of course you will be credited for your help.

thanks,
cotdamn
 
Something like onBuildingBuilt(self, argsList):

Code:
	if iBuildingType == gc.getInfoTypeForString('BUILDING_WHATEVER'):
		pPlayer = gc.getPlayer(player)
		iTech = gc.getInfoTypeForString('TECH_WHATEVER')
		eTeam = gc.getTeam(pPlayer.getTeam())
		if eTeam.isHasTech(iTech) == False:
			eTeam.setHasTech(iTech, True, player, False, True)
 
thanks Kael :goodjob:
 
Back
Top Bottom