Hell all im working on a respawning AI function. only one problem, it doesnt respawn =/. heres the function. i can post full code if requested
def fuckingtest(self, task):
if self.AIisSpawned == False:
self.loadAI()
self.AIisSpawned = True
self.shouldAddAICol = True
return task.cont
def updateAIPos(self, task):
if self.shouldAddAICol == True:
self.addCollision(self.ai)
print 'adding ai col'
self.shouldAddAICol = False
if self.AIisSpawned == True:
self.ai.setPos(self.ai,self.FORWARD*self.speed/10)
if self.ailife <= 0:
self.ai.removeNode()
self.AIisSpawned = False
print 'ded'
return (self.AIisSpawned)
return task.cont
i tried printing all the booleans and they were all correct. its like after AIisSpawned is set back to false again it doesnt pick it up or something.