I have a sequence (shown in code below) which seems to be working perfectly, yet when I try to call finish() on it, it runs one of the functions appended to it. The function is Func(messenger.send, ‘exittomenu’)).
def podSequence(self):
self.podSeq = Sequence()
self.podSeq.append(LerpPosInterval(self.podNode,
ZONE_TIME,
self.endNode.getPos(render),
self.podNode.getPos()))
self.podSeq.append(Func(self.endZoneShipNode.show))
self.podSeq.append(LerpColorInterval(self.endZoneShipNode,
10.0,
Vec4(1, 1, 1, 1),
Vec4(1, 1, 1, 0),
))
self.podSeq.append(Wait(6.0))
self.podSeq.append(Func(self.endZone))
self.podSeq.append(Wait(6.5))
# This is the problem line
self.podSeq.append(Func(messenger.send, 'exittomenu'))
self.podSeq.start()
self.sequenceList.append(self.podSeq)
As you can see, many lerps and other stuff are appended, but the only thing that seems to be firing upon a finish() is that messenger call. I am finishing the Sequence in the class’ cleanUp function below (Note that all sequences are in the list self.sequenceList)
def cleanUp(self):
print "ZONE TWO CLEANUP"
taskMgr.remove('SpawnAI')
taskMgr.remove('Check Distance')
for seq in self.sequenceList:
seq.finish()
del seq
del self.sequenceList
print "DEBUG"
self.cockpitNode.removeNode()
self.zoneTwo.removeNode()
self.zoneImage.removeNode()
self.pod.cleanUp()
del self.player
I have tested commenting out the “del seq” line, but no dice there, and finishing the sequence is mandatory.
Thanks for any help.