somebody_else2
Chieftain
- Joined
- Dec 22, 2007
- Messages
- 10
Hello,
I've been modding FinalFrontier for some while now and want to add some new event handlers. I have added the following code to the CvFinalFrontierEvents class in CvFinalFrontierEvents.py
The problem is that that code is not even called. onUnitLost/onUnitCreated do not appear in PythonDbg.log nor does creating a unit in the world builder seem to have any effect.
Do I have to enable each event somewhere before it is dispatched to Python or what am I doing wrong?
I've been modding FinalFrontier for some while now and want to add some new event handlers. I have added the following code to the CvFinalFrontierEvents class in CvFinalFrontierEvents.py
Code:
#MOD START
def onUnitLost(self, pUnit):
print "onUnitLost"
self.parent.onUnitLost(pUnit)
AI.doUnitDie(pUnit)
def onUnitCreated(self, pUnit):
print "onUnitCreated"
self.parent.onUnitCreated(pUnit)
AI.doUnitBirth(pUnit)
#MOD END
Do I have to enable each event somewhere before it is dispatched to Python or what am I doing wrong?