def announceGenerate(self): DistributedAvatarAI.announceGenerate(self) self.clearTrack() self.startAI() # Let's set the combo data task name and start the task. self.comboDataTaskName = self.uniqueName('clearComboData') taskMgr.add(self.clearComboData, self.comboDataTaskName) #dur = 8 #Sequence( # Func(self.setH, 90), # Wait(0.5), # self.posInterval(dur, (-25, 0, 0), (25, 0, 0), blendType = 'easeInOut'), # Wait(0.5), # Func(self.setH, -90), # Wait(0.5), # self.posInterval(dur, (25, 0, 0), (-25, 0, 0), blendType = 'easeInOut'), # Wait(0.5) # )#.loop() #self.setH(90) self.startPosHprBroadcast()
def announceGenerate(self): DistributedAvatarAI.announceGenerate(self) if self.cEntity: self.setPos(self.cEntity.getOrigin()) self.setHpr(self.cEntity.getAngles()) self.startPosHprBroadcast() self.startAI()
def announceGenerate(self): DistributedAvatarAI.announceGenerate(self) if self.cEntity: self.setPos(self.cEntity.getOrigin()) self.setHpr(self.cEntity.getAngles()) self.startPosHprBroadcast() self.enableThink() self.setNPCState(STATE_SCRIPT) self.startAI() self.changeSchedule(self.getScheduleByName("OPENING_SPEECH"), False)
def announceGenerate(self): DistributedAvatarAI.announceGenerate(self) self.clearTrack() # Let's set the combo data task name and start the task. self.comboDataTaskName = self.uniqueName('clearComboData') taskMgr.add(self.clearComboData, self.comboDataTaskName) taskMgr.add(self.monitorHealth, self.uniqueName('monitorHealth')) self.stopPosHprBroadcast() self.stopAI()
def announceGenerate(self): DistributedAvatarAI.announceGenerate(self) if not self.eyeLensNP: lens = PerspectiveLens() lens.setMinFov(180.0 / (4. / 3.)) node = LensNode('toonEyes', lens) node.activateLens(0) self.eyeLensNP = self.attachNewNode(node) self.eyeLensNP.setZ(self.getHeight() - 0.5) self.eyeLensNP.setY(-1) self.setEyesOpenDuration() taskMgr.add(self.__eyesLookTask, self.taskName("eyesLookTask"))
def announceGenerate(self): DistributedAvatarAI.announceGenerate(self) DistributedEntityAI.announceGenerate(self) self.setPos(self.cEntity.getOrigin()) self.setHpr(self.cEntity.getAngles() - (180, 0, 0)) pos = self.getPos() hpr = self.getHpr() self.d_setPosHpr(pos[0], pos[1], pos[2], hpr[0], hpr[1], hpr[2]) self.startPosHprBroadcast() self.startAI() if self.spawnflags & self.StartsAsleep: self.setNPCState(STATE_IDLE) else: self.setNPCState(STATE_ALERT)
def announceGenerate(self): DistributedAvatarAI.announceGenerate(self) DistributedSmoothNodeAI.announceGenerate(self) if self.parentId != self.getDefaultShard(): self.b_setDefaultShard(self.parentId)
def announceGenerate(self): DistributedAvatarAI.announceGenerate(self) data = CHAR_DATA[self.charId] self.talkEnabled = data[4] self.fsm.request('neutral', [True])
def announceGenerate(self): DistributedAvatarAI.announceGenerate(self)