pythonCanDo only for the human player

wotan321

Emperor
Joined
Oct 25, 2001
Messages
1,228
Location
NC, USA
Again, I know this question has been asked and answered a dozen times, but I searched and am not finding it.

I want a PythonCanDo for an eventtrigger, so that it only triggers for the human player.

Any help is appreciated.
 
I took the Tea event as a start (<bPickPlayer>1 in the Trigger file).

Then:
Code:
def canTriggerTea(argsList):

	kTriggeredData = argsList[0]
	player = gc.getPlayer(kTriggeredData.ePlayer)
	if (player.isAlive() and player.isHuman()):
		return true
	else:
		return false
 
Thank-you for this. You helped me in 2 ways, one by answering my question, and secondly you made me realize my troubleshooting and problem solving could have been better.... The first place I should have looked for the answer is in the python files that already exist!
 
Top Bottom