Beispiel #1
0
    def __init__(self, air):
        DistributedSuitBaseAI.__init__(self, air, None)

        suitDNA = SuitDNA.SuitDNA()
        suitDNA.newSuit('f')
        self.dna = suitDNA
        self.setLevel(1)
Beispiel #2
0
 def parseLoadSuit(self, line):
     token, name, suitType = line
     suit = Suit.Suit()
     dna = SuitDNA.SuitDNA()
     dna.newSuit(suitType)
     suit.setDNA(dna)
     self.setVar(name, suit)
Beispiel #3
0
 def __init__(self, index, collSolid, motionPath=None):
     self.prop = None
     self.suit = Suit.Suit()
     d = SuitDNA.SuitDNA()
     d.newSuit(Globals.Gameplay.MinionDnaName)
     self.suit.setDNA(d)
     self.suit.setScale(Globals.Gameplay.MinionScale)
     self.suit.nametag3d.stash()
     self.suit.nametag.destroy()
     swapAvatarShadowPlacer(self.suit, 'minion-%sShadowPlacer' % index)
     self.mopathNodePath = NodePath('mopathNodePath')
     self.suit.reparentTo(self.mopathNodePath)
     CogdoFlyingObstacle.__init__(
         self,
         Globals.Level.ObstacleTypes.Minion,
         index,
         self.mopathNodePath,
         collSolid,
         motionPath=motionPath,
         motionPattern=CogdoFlyingObstacle.MotionTypes.Loop,
         blendMotion=False,
         instanceModel=False)
     self.lastPos = None
     self.suit.loop('neutral')
     return
Beispiel #4
0
 def __setupSuitInfo(self, suit, bldgTrack, suitLevel, suitType):
     dna = SuitDNA.SuitDNA()
     dna.newSuitRandom(suitType, bldgTrack)
     suit.dna = dna
     self.notify.debug('Creating suit type ' + suit.dna.name +
                       ' of level ' + str(suitLevel) + ' from type ' +
                       str(suitType) + ' and track ' + str(bldgTrack))
     suit.setLevel(suitLevel)
     return False
    def setupEnemy(self, suitAttribs):
        suitType = suitAttribs[0]
        self.suit = Suit.Suit()
        suitDNA = SuitDNA.SuitDNA()
        suitDNA.newSuit(suitType)
        self.suit.setDNA(suitDNA)
        self.suit.pose('walk', 0)
        self.suitName = 'Enemy-%s' % self.index
        self.suit.setName(self.suitName)
        self.suit.nametag3d.stash()
        self.suit.nametag.destroy()
        suitPosAttribs = suitAttribs[1]
        initX, initY, initZ = suitPosAttribs[0]
        initPos = Point3(initX, initY, initZ)
        if len(suitPosAttribs) == 3:
            finalX, finalY, finalZ = suitPosAttribs[1]
            finalPos = Point3(finalX, finalY, finalZ)
            posIvalDuration = suitPosAttribs[2]
            self.clearMoveIval()

            def getForwardIval(blendTypeStr, self = self):
                forwardIval = LerpPosInterval(self.suit, posIvalDuration, pos=finalPos, startPos=initPos, name='%s-moveFront' % self.suitName, blendType=blendTypeStr, fluid=1)
                return forwardIval

            def getBackwardIval(blendTypeStr, self = self):
                backwardIval = LerpPosInterval(self.suit, posIvalDuration, pos=initPos, startPos=finalPos, name='%s-moveBack' % self.suitName, blendType=blendTypeStr, fluid=1)
                return backwardIval

            if abs(finalZ - initZ) > 0.0:

                def setIsGoingUp(value):
                    self.isGoingUp = value

                self.isMovingUpDown = True
                self.suit.setH(90)
                self.suit.prop = None
                if self.suit.prop == None:
                    self.suit.prop = BattleProps.globalPropPool.getProp('propeller')
                    self.suit.prop.setScale(1.1)
                    self.suit.prop.setColor(1, 1, 0.6, 1)
                head = self.suit.find('**/joint_head')
                self.suit.prop.reparentTo(head)
                self.propTrack = Sequence(ActorInterval(self.suit.prop, 'propeller', startFrame=8, endFrame=25, playRate=2.0))
                self.animTrack = Sequence(ActorInterval(self.suit, 'landing', startFrame=8, endFrame=28, playRate=0.5), ActorInterval(self.suit, 'landing', startFrame=8, endFrame=28, playRate=-0.5))
                self.moveIval = Sequence(Func(setIsGoingUp, True), getForwardIval('easeInOut'), Func(setIsGoingUp, False), getBackwardIval('easeInOut'))
                self.suitSound = base.loadSfx('phase_4/audio/sfx/TB_propeller.ogg')
            else:
                self.isMovingLeftRight = True
                self.moveIval = Sequence(Func(self.setHeading, finalPos, initPos), getForwardIval('noBlend'), Func(self.setHeading, initPos, finalPos), getBackwardIval('noBlend'))
        self.suit.setPos(initX, initY, initZ)
        self.suit.dropShadow.hide()
        self.setupCollision()
        return
Beispiel #6
0
    def makeSuit(self, suitType):
        suit = Suit.Suit()
        dna = SuitDNA.SuitDNA()
        dna.newSuit(suitType)
        suit.setStyle(dna)
        suit.isDisguised = 1
        suit.generateSuit()
        suit.setScale(1.05, 1.05, 2.05)
        suit.setPos(0, 0, -4.4)
        suit.reparentTo(self.toonHead)
        for part in suit.getHeadParts():
            part.hide()

        suit.loop('neutral')
Beispiel #7
0
 def __setupSuitInfo(self, suit, bldgTrack, suitLevel, suitType):
     suitDeptIndex, suitTypeIndex, flags = simbase.air.suitInvasionManager.getInvadingCog(
     )
     if self.respectInvasions:
         if suitDeptIndex is not None:
             bldgTrack = SuitDNA.suitDepts[suitDeptIndex]
         if suitTypeIndex is not None:
             suitName = SuitDNA.getSuitName(suitDeptIndex, suitTypeIndex)
             suitType = SuitDNA.getSuitType(suitName)
             suitLevel = min(max(suitLevel, suitType), suitType + 4)
     dna = SuitDNA.SuitDNA()
     dna.newSuitRandom(suitType, bldgTrack)
     suit.dna = dna
     suit.setLevel(suitLevel)
     return flags
 def createSuitHead(self, suitName):
     suitDNA = SuitDNA.SuitDNA()
     suitDNA.newSuit(suitName)
     suit = Suit.Suit()
     suit.setDNA(suitDNA)
     headParts = suit.getHeadParts()
     head = hidden.attachNewNode('head')
     for part in headParts:
         copyPart = part.copyTo(head)
         copyPart.setDepthTest(1)
         copyPart.setDepthWrite(1)
     self.fitGeometry(head, fFlip=1)
     suit.delete()
     suit = None
     return head
 def createDiner(self, i):
     diner = Suit.Suit()
     diner.dna = SuitDNA.SuitDNA()
     level = self.dinerInfo[i][2]
     level -= 4
     dept = self.dinerInfo[i][3][i]
     diner.dna.newSuitRandom(level=level, dept=dept)
     diner.setDNA(diner.dna)
     diner.nametag3d.stash()
     diner.nametag.destroy()
     if self.useNewAnimations:
         diner.loop('sit', fromFrame=i)
     else:
         diner.pose('landing', 0)
     locator = self.tableGroup.find('**/chair_%d' % (i + 1))
     locatorScale = locator.getNetTransform().getScale()[0]
     correctHeadingNp = locator.attachNewNode('correctHeading')
     self.chairLocators[i] = correctHeadingNp
     heading = self.rotationsPerSeatIndex[i]
     correctHeadingNp.setH(heading)
     sitLocator = correctHeadingNp.attachNewNode('sitLocator')
     base.sitLocator = sitLocator
     pos = correctHeadingNp.getPos(render)
     if SuitDNA.getSuitBodyType(diner.dna.name) == 'c':
         sitLocator.setPos(0.5, 3.65, -3.75)
     else:
         sitLocator.setZ(-2.4)
         sitLocator.setY(2.5)
         sitLocator.setX(0.5)
     self.sitLocators[i] = sitLocator
     diner.setScale(1.0 / locatorScale)
     diner.reparentTo(sitLocator)
     newLoc = NodePath('serviceLoc-%d-%d' % (self.index, i))
     newLoc.reparentTo(correctHeadingNp)
     newLoc.setPos(0, 3.0, 1)
     self.serviceLocs[i] = newLoc
     base.serviceLoc = newLoc
     head = diner.find('**/joint_head')
     newIndicator = DinerStatusIndicator.DinerStatusIndicator(parent=head,
                                                              pos=Point3(
                                                                  0, 0,
                                                                  3.5),
                                                              scale=5.0)
     newIndicator.wrtReparentTo(diner)
     self.dinerStatusIndicators[i] = newIndicator
     return diner
Beispiel #10
0
 def __init__(self, cogIndex, suitType, game, cogSpeed):
     self.cogIndex = cogIndex
     self.suitType = suitType
     self.game = game
     self.cogSpeed = cogSpeed
     suit = Suit.Suit()
     d = SuitDNA.SuitDNA()
     d.newSuit(suitType)
     suit.setDNA(d)
     suit.pose('walk', 0)
     self.suit = suit
     self.goal = CTGG.NoGoal
     self.goalId = CTGG.InvalidGoalId
     self.lastLocalTimeStampFromAI = 0
     self.lastPosFromAI = Point3(0, 0, 0)
     self.lastThinkTime = 0
     self.doneAdjust = False
     self.barrel = CTGG.NoBarrelCarried
     self.signalledAtReturnPos = False
     self.defaultPlayRate = 1.0
     self.netTimeSentToStartByHit = 0
     self.velocity = Vec3(0, 0, 0)
     self.oldVelocity = Vec3(0, 0, 0)
     self.acceleration = Vec3(0, 0, 0)
     self.bodyLength = self.CollisionRadius * 2
     self.cruiseDistance = 2 * self.bodyLength
     self.maxVelocity = self.cogSpeed
     self.maxAcceleration = 5.0
     self.perceptionRange = 6
     self.notify.debug('cogSpeed=%s' % self.cogSpeed)
     self.kaboomSound = loader.loadSfx(
         'phase_4/audio/sfx/MG_cannon_fire_alt.ogg')
     self.kaboom = loader.loadModel(
         'phase_4/models/minigames/ice_game_kaboom')
     self.kaboom.setScale(2.0)
     self.kaboom.setBillboardPointEye()
     self.kaboom.hide()
     self.kaboomTrack = None
     splatName = 'splat-creampie'
     self.splat = globalPropPool.getProp(splatName)
     self.splat.setBillboardPointEye()
     self.splatType = globalPropPool.getPropType(splatName)
     self.pieHitSound = globalBattleSoundCache.getSound(
         'AA_wholepie_only.ogg')
     return
Beispiel #11
0
 def __init__(self, nest, index, suitDnaName = 'le'):
     FSM.__init__(self, 'CogdoFlyingLegalEagle')
     self.defaultTransitions = {'Off': ['Roost'],
      'Roost': ['TakeOff', 'Off'],
      'TakeOff': ['LockOnToon', 'LandOnNest', 'Off'],
      'LockOnToon': ['RetreatToNest', 'ChargeUpAttack', 'Off'],
      'ChargeUpAttack': ['RetreatToNest', 'Attack', 'Off'],
      'Attack': ['RetreatToSky', 'Off'],
      'RetreatToSky': ['Cooldown', 'Off'],
      'Cooldown': ['LockOnToon', 'LandOnNest', 'Off'],
      'RetreatToNest': ['LandOnNest', 'Off'],
      'LandOnNest': ['Roost', 'Off']}
     self.index = index
     self.nest = nest
     self.target = None
     self.isEagleInterested = False
     self.collSphere = None
     self.suit = Suit.Suit()
     d = SuitDNA.SuitDNA()
     d.newSuit(suitDnaName)
     self.suit.setDNA(d)
     self.suit.reparentTo(render)
     swapAvatarShadowPlacer(self.suit, 'legalEagle-%sShadowPlacer' % index)
     self.suit.setPos(self.nest.getPos(render))
     self.suit.setHpr(-180, 0, 0)
     self.suit.stash()
     self.prop = None
     self.attachPropeller()
     head = self.suit.find('**/joint_head')
     self.interestConeOrigin = self.nest.attachNewNode('fakeHeadNodePath')
     self.interestConeOrigin.setPos(render, head.getPos(render) + Vec3(0, Globals.LegalEagle.InterestConeOffset, 0))
     self.attackTargetPos = None
     self.startOfRetreatToSkyPos = None
     pathModel = CogdoUtil.loadFlyingModel('legalEaglePaths')
     self.chargeUpMotionPath = Mopath.Mopath(name='chargeUpMotionPath-%i' % self.index)
     self.chargeUpMotionPath.loadNodePath(pathModel.find('**/charge_path'))
     self.retreatToSkyMotionPath = Mopath.Mopath(name='retreatToSkyMotionPath-%i' % self.index)
     self.retreatToSkyMotionPath.loadNodePath(pathModel.find('**/retreat_path'))
     audioMgr = base.cogdoGameAudioMgr
     self._screamSfx = audioMgr.createSfx('legalEagleScream', self.suit)
     self.initIntervals()
     self.suit.nametag3d.stash()
     self.suit.nametag.destroy()
     return
Beispiel #12
0
 def __init__(
         self,
         serialNum,
         maze,
         randomNumGen,
         cellWalkPeriod,
         difficulty,
         suitDnaName='f',
         startTile=None,
         ticFreq=MazeGameGlobals.SUIT_TIC_FREQ,
         walkSameDirectionProb=MazeGameGlobals.WALK_SAME_DIRECTION_PROB,
         walkTurnAroundProb=MazeGameGlobals.WALK_TURN_AROUND_PROB,
         uniqueRandomNumGen=True,
         walkAnimName=None):
     self.serialNum = serialNum
     self.maze = maze
     if uniqueRandomNumGen:
         self.rng = RandomNumGen(randomNumGen)
     else:
         self.rng = randomNumGen
     self.difficulty = difficulty
     self._walkSameDirectionProb = walkSameDirectionProb
     self._walkTurnAroundProb = walkTurnAroundProb
     self._walkAnimName = walkAnimName or 'walk'
     self.suit = Suit.Suit()
     d = SuitDNA.SuitDNA()
     d.newSuit(suitDnaName)
     self.suit.setDNA(d)
     self.suit.nametag3d.stash()
     self.suit.nametag.destroy()
     if startTile is None:
         defaultStartPos = MazeGameGlobals.SUIT_START_POSITIONS[
             self.serialNum]
         self.startTile = (defaultStartPos[0] * self.maze.width,
                           defaultStartPos[1] * self.maze.height)
     else:
         self.startTile = startTile
     self.ticFreq = ticFreq
     self.ticPeriod = int(cellWalkPeriod)
     self.cellWalkDuration = float(self.ticPeriod) / float(self.ticFreq)
     self.turnDuration = 0.6 * self.cellWalkDuration
     return
Beispiel #13
0
 def createSuit(self):
     self.suit = Suit.Suit()
     suitDNA = SuitDNA.SuitDNA()
     suitDNA.newSuit('f')
     self.suit.setDNA(suitDNA)
     self.suit.nametag3d.stash()
     self.suit.nametag.destroy()
     self.suit.loop('neutral')
     self.suit.setPosHpr(-20, 8, 0, 0, 0, 0)
     self.suit.reparentTo(self.interior)
     self.suitWalkTrack = Sequence(
         self.suit.hprInterval(0.1, Vec3(0, 0, 0)),
         Func(self.suit.loop, 'walk'),
         self.suit.posInterval(2, Point3(-20, 20, 0)),
         Func(self.suit.loop, 'neutral'), Wait(1.0),
         self.suit.hprInterval(0.1, Vec3(180, 0, 0)),
         Func(self.suit.loop, 'walk'),
         self.suit.posInterval(2, Point3(-20, 10, 0)),
         Func(self.suit.loop, 'neutral'), Wait(1.0))
     self.suitWalkTrack.loop()
 def loadCogJuror(self):
     self.cleanupCogJuror()
     self.cogJuror = Suit.Suit()
     level = self.randomGenerator.randrange(len(SuitDNA.suitsPerLevel))
     self.cogJuror.dna = SuitDNA.SuitDNA()
     self.cogJuror.dna.newSuitRandom(level=level, dept='l')
     self.cogJuror.setDNA(self.cogJuror.dna)
     self.cogJuror.pose('landing', 0)
     self.cogJuror.reparentTo(self.nodePath)
     self.cogJuror.prop = None
     if self.cogJuror.prop == None:
         self.cogJuror.prop = BattleProps.globalPropPool.getProp(
             'propeller')
     head = self.cogJuror.find('**/joint_head')
     self.cogJuror.prop.reparentTo(head)
     self.propTrack = Sequence(
         ActorInterval(self.cogJuror.prop,
                       'propeller',
                       startFrame=8,
                       endFrame=25))
     return
Beispiel #15
0
    def load(self):
        self.notify.debug('load')
        DistributedMinigame.load(self)
        self.defineConstants()
        groundModels = [
            'phase_4/models/minigames/treehouse_2players',
            'phase_4/models/minigames/treehouse_2players',
            'phase_4/models/minigames/treehouse_3players',
            'phase_4/models/minigames/treehouse_4players'
        ]
        index = self.getNumPlayers() - 1
        self.ground = loader.loadModel(groundModels[index])
        self.ground.setHpr(180, -90, 0)
        self.dropShadow = loader.loadModel('phase_3/models/props/drop_shadow')
        self.dropObjModels = {}
        for objType in DropObjectTypes:
            if objType.name not in ['anvil', self.fruitName]:
                continue
            model = loader.loadModel(objType.modelPath)
            self.dropObjModels[objType.name] = model
            modelScales = {
                'apple': 0.7,
                'orange': 0.7,
                'pear': 0.5,
                'coconut': 0.7,
                'watermelon': 0.6,
                'pineapple': 0.45
            }
            if objType.name in modelScales:
                model.setScale(modelScales[objType.name])
            if objType == Name2DropObjectType['pear']:
                model.setZ(-.6)
            if objType == Name2DropObjectType['coconut']:
                model.setP(180)
            if objType == Name2DropObjectType['watermelon']:
                model.setH(135)
                model.setZ(-.5)
            if objType == Name2DropObjectType['pineapple']:
                model.setZ(-1.7)
            if objType == Name2DropObjectType['anvil']:
                model.setZ(-self.ObjRadius)
            model.flattenMedium()

        self.music = base.loadMusic('phase_4/audio/bgm/MG_toontag.ogg')
        self.sndGoodCatch = base.loadSfx(
            'phase_4/audio/sfx/SZ_DD_treasure.ogg')
        self.sndOof = base.loadSfx('phase_4/audio/sfx/MG_cannon_hit_dirt.ogg')
        self.sndAnvilLand = base.loadSfx(
            'phase_4/audio/sfx/AA_drop_anvil_miss.ogg')
        self.sndPerfect = base.loadSfx('phase_4/audio/sfx/ring_perfect.ogg')
        self.toonSDs = {}
        avId = self.localAvId
        toonSD = CatchGameToonSD.CatchGameToonSD(avId, self)
        self.toonSDs[avId] = toonSD
        toonSD.load()
        if self.WantSuits:
            suitTypes = ['f', 'tm', 'pp', 'dt']
            self.suits = []
            for type in suitTypes:
                suit = Suit.Suit()
                d = SuitDNA.SuitDNA()
                d.newSuit(type)
                suit.setDNA(d)
                suit.nametag3d.stash()
                suit.nametag.destroy()
                suit.pose('walk', 0)
                self.suits.append(suit)

        self.__textGen = TextNode('ringGame')
        self.__textGen.setFont(ToontownGlobals.getSignFont())
        self.__textGen.setAlign(TextNode.ACenter)
        self.introMovie = self.getIntroMovie()
Beispiel #16
0
    def load(self):
        CogdoGameMovie.load(self)
        self.toonDNA = ToonDNA.ToonDNA()
        self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2,
                                           1, 8, 1, 8, 1, 14, 0)
        self.toonHead = Toon.Toon()
        self.toonHead.setDNA(self.toonDNA)
        self.makeSuit('sc')
        self.toonHead.getGeomNode().setDepthWrite(1)
        self.toonHead.getGeomNode().setDepthTest(1)
        self.toonHead.loop('neutral')
        self.toonHead.setPosHprScale(-0.73, 0, -1.27, 180, 0, 0, 0.18, 0.18,
                                     0.18)
        self.toonHead.reparentTo(hidden)
        self.toonHead.startBlink()
        self.cogHead = Suit.Suit()
        self.cogDNA = SuitDNA.SuitDNA()
        self.cogDNA.newSuit('ms')
        self.cogHead.setDNA(self.cogDNA)
        self.cogHead.getGeomNode().setDepthWrite(1)
        self.cogHead.getGeomNode().setDepthTest(1)
        self.cogHead.loop('neutral')
        self.cogHead.setPosHprScale(-0.73, 0, -1.46, 180, 0, 0, 0.14, 0.14,
                                    0.14)
        self.cogHead.reparentTo(hidden)
        self.cogHead.nametag3d.hide()
        self.clipPlane = self.toonHead.attachNewNode(PlaneNode('clip'))
        self.clipPlane.node().setPlane(Plane(0, 0, 1, 0))
        self.clipPlane.setPos(0, 0, 2.45)
        audioMgr = base.cogdoGameAudioMgr
        self._cogDialogueSfx = audioMgr.createSfx('cogDialogue')
        self._toonDialogueSfx = audioMgr.createSfx('toonDialogue')
        suitData = Globals.SuitData[Globals.SuitTypes.Boss]
        bossSuit = Suit.Suit()
        d = SuitDNA.SuitDNA()
        d.newSuit(suitData['dnaName'])
        bossSuit.setDNA(d)
        bossSuit.nametag3d.stash()
        bossSuit.nametag.destroy()
        bossSuit.setScale(suitData['scale'])
        bossSuit.loop('neutral')
        bossSuit.reparentTo(render)
        bossSuit.setPos(self._exit, -5, -5, 0)
        bossSuit.lookAt(self._exit)
        self._suits.append(bossSuit)
        self._camHelperNode = NodePath('CamHelperNode')
        self._camHelperNode.reparentTo(render)
        dialogue = TTLocalizer.CogdoMazeIntroMovieDialogue
        introDuration = Globals.IntroDurationSeconds
        waitDuration = introDuration / len(dialogue)

        def start():
            camera.wrtReparentTo(render)
            self._exit.open(animate=False)

        def showBoss():
            self._setCamTarget(bossSuit,
                               20,
                               offset=Point3(0, 0, 7),
                               angle=Point3(0, 15, 0))
            bossSuit.loop('victory')
            self._state = 1

        def showExit():
            self._setCamTarget(self._exit,
                               10,
                               offset=Point3(0, 0, 0),
                               angle=Point3(0, 60, 0))
            self._exit.close()
            self._state = 2

        showExitIval = Parallel(
            camera.posInterval(waitDuration * 0.5, (10, -25, 20),
                               other=self._exit,
                               blendType='easeInOut'),
            Sequence(
                Wait(waitDuration * 0.25), Func(bossSuit.play, 'effort'),
                camera.hprInterval(waitDuration * 0.25, (30, -30, 0),
                                   blendType='easeInOut'),
                Func(self._exit.close), Wait(waitDuration * 0.5)))

        def showWaterCooler():
            wc = self._maze.getWaterCoolers()[0]
            self._setCamTarget(wc, 25, angle=Point3(-30, 60, 0))
            camera.wrtReparentTo(self._camHelperNode)
            self._state = 3

        def end():
            self._stopUpdateTask()

        self._ival = Sequence(
            Func(start),
            Func(self.displayLine, 'toon', self._getRandomLine(dialogue[0])),
            showExitIval, Func(showWaterCooler),
            Func(self.displayLine, 'toon', self._getRandomLine(dialogue[1])),
            Wait(waitDuration), Func(showBoss),
            bossSuit.hprInterval(1.0,
                                 bossSuit.getHpr() + Point3(180, 0, 0),
                                 blendType='easeInOut'),
            Func(self.displayLine, 'toon', self._getRandomLine(dialogue[2])),
            Wait(waitDuration - 1.0), Func(end))
        self._startUpdateTask()
    def load(self):
        CogdoGameMovie.load(self)
        self.toonDNA = ToonDNA.ToonDNA()
        self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2,
                                           1, 8, 1, 8, 1, 14, 0)
        self.toonHead = Toon.Toon()
        self.toonHead.setDNA(self.toonDNA)
        self.makeSuit('sc')
        self.toonHead.getGeomNode().setDepthWrite(1)
        self.toonHead.getGeomNode().setDepthTest(1)
        self.toonHead.loop('neutral')
        self.toonHead.setPosHprScale(-0.73, 0, -1.27, 180, 0, 0, 0.18, 0.18,
                                     0.18)
        self.toonHead.reparentTo(hidden)
        self.toonHead.startBlink()
        self.cogHead = Suit.Suit()
        self.cogDNA = SuitDNA.SuitDNA()
        self.cogDNA.newSuit('le')
        self.cogHead.setDNA(self.cogDNA)
        self.cogHead.getGeomNode().setDepthWrite(1)
        self.cogHead.getGeomNode().setDepthTest(1)
        self.cogHead.loop('neutral')
        self.cogHead.setPosHprScale(-0.74, 0, -1.79, 180, 0, 0, 0.12, 0.14,
                                    0.14)
        self.cogHead.reparentTo(hidden)
        self.cogHead.nametag3d.hide()
        self.clipPlane = self.toonHead.attachNewNode(PlaneNode('clip'))
        self.clipPlane.node().setPlane(Plane(0, 0, 1, 0))
        self.clipPlane.setPos(0, 0, 2.45)
        audioMgr = base.cogdoGameAudioMgr
        self._cogDialogueSfx = audioMgr.createSfx('cogDialogue')
        self._toonDialogueSfx = audioMgr.createSfx('toonDialogue')

        def start():
            camera.wrtReparentTo(render)
            self._startUpdateTask()

        def end():
            self._stopUpdateTask()

        introDuration = Globals.Gameplay.IntroDurationSeconds
        dialogue = TTLocalizer.CogdoFlyingIntroMovieDialogue
        waitDur = introDuration / len(dialogue)
        flyDur = introDuration - waitDur * 0.5
        flyThroughIval = Parallel(
            camera.posInterval(flyDur,
                               self._exit.getPos(render) + Point3(0, -22, 1),
                               blendType='easeInOut'),
            camera.hprInterval(flyDur, Point3(0, 5, 0), blendType='easeInOut'))
        self._ival = Sequence(
            Func(start),
            Parallel(
                flyThroughIval,
                Sequence(
                    Func(self.displayLine, 'cog',
                         self._getRandomLine(dialogue[0])), Wait(waitDur),
                    Func(self.displayLine, 'toon',
                         self._getRandomLine(dialogue[1])), Wait(waitDur),
                    Func(self.displayLine, 'cog',
                         self._getRandomLine(dialogue[2])), Wait(waitDur))),
            Func(end))