Exemple #1
0
def teleportIn(attack, npc, pos = Point3(0, 0, 0), hpr = Vec3(180.0, 0.0, 0.0)):
    if npc.getName() == 'Magic Cat':
        LaughingManGlobals.addToonEffect(npc)
        npc.nametag3d.hide()
    a = Func(npc.reparentTo, attack['battle'])
    b = Func(npc.setPos, pos)
    c = Func(npc.setHpr, hpr)
    d = Func(npc.pose, 'teleport', npc.getNumFrames('teleport') - 1)
    e = npc.getTeleportInTrack()
    ee = Func(npc.addActive)
    if npc.getName() == 'Trap Cat':
        f = Func(npc.setChatAbsolute, 'We are team trap! Fear me %s' % attack['toon'].getName() + ' for I am the Notorious T-Cat', CFSpeech | CFTimeout)
    else:
        f = Func(npc.setChatAbsolute, TTLocalizer.MovieNPCSOSGreeting % attack['toon'].getName(), CFSpeech | CFTimeout)
    if npc.getName() == 'Trap Cat':
        g = ActorInterval(npc, 'angry')
    else:
        g = ActorInterval(npc, 'wave')
    h = Func(npc.loop, 'neutral')
    seq = Sequence(a, b, c, d, e, ee, f, g, h)
    if npc.getName() == 'Trap Cat':
        seq.append(Wait(3))
    seq.append(Func(npc.clearChat))
    if npc.getName() == 'Magic Cat':
        magicCatTrack = Sequence()
        magicCatTrack.append(Func(npc.setChatAbsolute, "I've got this, so start dancing!", CFSpeech | CFTimeout))
        magicCatTrack.append(Func(attack['toon'].loop, 'victory'))
        seq.append(magicCatTrack)
    return seq
Exemple #2
0
def teleportIn(attack, npc, pos = Point3(0, 0, 0), hpr = Vec3(180.0, 0.0, 0.0)):
    if npc.getName() == 'Magic Cat':
        LaughingManGlobals.addToonEffect(npc)
        npc.nametag3d.hide()
    a = Func(npc.reparentTo, attack['battle'])
    b = Func(npc.setPos, pos)
    c = Func(npc.setHpr, hpr)
    d = Func(npc.pose, 'teleport', npc.getNumFrames('teleport') - 1)
    e = npc.getTeleportInTrack()
    ee = Func(npc.addActive)
    if npc.getName() == 'Trap Cat':
        f = Func(npc.setChatAbsolute, 'We are team trap! Fear me %s' % attack['toon'].getName() + ' for I am the Notorious T-Cat', CFSpeech | CFTimeout)
    else:
        f = Func(npc.setChatAbsolute, TTLocalizer.MovieNPCSOSGreeting % attack['toon'].getName(), CFSpeech | CFTimeout)
    if npc.getName() == 'Trap Cat':
        g = ActorInterval(npc, 'angry')
    else:
        g = ActorInterval(npc, 'wave')
    h = Func(npc.loop, 'neutral')
    seq = Sequence(a, b, c, d, e, ee, f, g, h)
    if npc.getName() == 'Trap Cat':
        seq.append(Wait(3))
    seq.append(Func(npc.clearChat))
    if npc.getName() == 'Magic Cat':
        magicCatTrack = Sequence()
        magicCatTrack.append(Func(npc.setChatAbsolute, "I've got this, so start dancing!", CFSpeech | CFTimeout))
        magicCatTrack.append(Func(attack['toon'].loop, 'victory'))
        seq.append(magicCatTrack)
    return seq
Exemple #3
0
def teleportIn(attack, npc, pos=Point3(0, 0, 0), hpr=Vec3(180.0, 0.0, 0.0)):
    if npc.getName() == 'Magic Cat':
        LaughingManGlobals.addToonEffect(npc)
        npc.nametag3d.hide()
    a = Func(npc.reparentTo, attack['battle'])
    b = Func(npc.setPos, pos)
    c = Func(npc.setHpr, hpr)
    d = Func(npc.pose, 'teleport', npc.getNumFrames('teleport') - 1)
    e = npc.getTeleportInTrack()
    ee = Func(npc.addActive)
    if npc.getName() == 'Trap Cat':
        f = Func(
            npc.setChatAbsolute,
            'We are team trap! Fear me %s' % attack['toon'].getName() +
            ' for I am the Notorious T-Cat', CFSpeech | CFTimeout)
    elif npc.getName() == 'Aqua Dog':
        f = Func(
            npc.setChatAbsolute, 'Yoooo, sup %s' % attack['toon'].getName() +
            '? I got this guys, dont worry.', CFSpeech | CFTimeout)
    elif npc.getName() == 'Cutie Britt':
        f = Func(npc.setChatAbsolute, 'Hello children, tiME fOr DeAtH',
                 CFSpeech | CFTimeout)
    elif npc.getName() == 'Uber Toon':
        f = Func(
            npc.setChatAbsolute,
            "How you doin' %s" % attack['toon'].getName() +
            " ;) I got this guys! Because Ken is better than Brit!",
            CFSpeech | CFTimeout)
    else:
        f = Func(npc.setChatAbsolute,
                 TTLocalizer.MovieNPCSOSGreeting % attack['toon'].getName(),
                 CFSpeech | CFTimeout)
    if npc.getName() == 'Trap Cat':
        g = ActorInterval(npc, 'angry')
    elif npc.getName() == 'Aqua Dog':
        g = ActorInterval(npc, 'think')
    elif npc.getName() == 'Cutie Britt':
        g = ActorInterval(npc, 'slip-backward')
    elif npc.getName() == 'Uber Toon':
        g = ActorInterval(npc, 'slip-forward')
    else:
        g = ActorInterval(npc, 'wave')
    h = Func(npc.loop, 'neutral')
    seq = Sequence(a, b, c, d, e, ee, f, g, h)
    if npc.getName() == 'Trap Cat':
        seq.append(Wait(3))
    seq.append(Func(npc.clearChat))
    if npc.getName() == 'Magic Cat':
        magicCatTrack = Sequence()
        magicCatTrack.append(
            Func(npc.setChatAbsolute, "I've got this, so start dancing!",
                 CFSpeech | CFTimeout))
        magicCatTrack.append(Func(attack['toon'].loop, 'victory'))
        seq.append(magicCatTrack)
    elif npc.getName() == 'Uber Toon':
        uberToonTrack = Sequence()
        #uberToonTrack.append(Func(npc.setChatAbsolute, "How you doin' %s" % attack['toon'].getName() + " ;) I got this guys! Because Ken is better than Brit!", CFSpeech | CFTimeout))
        uberToonTrack.append(Func(attack['toon'].loop, 'conked'))
        seq.append(uberToonTrack)
    return seq
def teleportIn(attack, npc, pos = Point3(0, 0, 0), hpr = Vec3(180.0, 0.0, 0.0)):
    if npc.getName() == 'Magic Cat':
        LaughingManGlobals.addToonEffect(npc)
        npc.nametag3d.hide()
    a = Func(npc.reparentTo, attack['battle'])
    b = Func(npc.setPos, pos)
    c = Func(npc.setHpr, hpr)
    d = Func(npc.pose, 'teleport', npc.getNumFrames('teleport') - 1)
    e = npc.getTeleportInTrack()
    ee = Func(npc.addActive)
    if npc.getName() == 'Sans':
        SansGlobals.addToonEffect(npc)
        npc.nametag3d.hide()
        a = Func(npc.reparentTo, attack['battle'])
        b = Func(npc.setPos, pos)
        c = Func(npc.setHpr, hpr)
        d = Func(npc.pose, 'teleport', npc.getNumFrames('teleport') - 1)
        e = npc.getTeleportInTrack()
        ee = Func(npc.addActive)
        f = Func(npc.setChatAbsolute, 'Do the cogs want to have a bad time?', CFSpeech | CFTimeout)
    if npc.getName() == 'Papyrus':
        PapyrusGlobals.addToonEffect(npc)
        npc.nametag3d.hide()
        a = Func(npc.reparentTo, attack['battle'])
        b = Func(npc.setPos, pos)
        c = Func(npc.setHpr, hpr)
        d = Func(npc.pose, 'teleport', npc.getNumFrames('teleport') - 1)
        e = npc.getTeleportInTrack()
        ee = Func(npc.addActive)
        f = Func(npc.setChatAbsolute, 'HEY, I HEARD YOU NEEDED SOME HELP.', CFSpeech | CFTimeout)
    if npc.getName() == 'Trap Cat':
        f = Func(npc.setChatAbsolute, 'We are team trap! Fear me %s' % attack['toon'].getName() + ' for I am the Notorious T-Cat', CFSpeech | CFTimeout)
    else:
        f = Func(npc.setChatAbsolute, TTLocalizer.MovieNPCSOSGreeting % attack['toon'].getName(), CFSpeech | CFTimeout)
    if npc.getName() == 'Trap Cat':
        g = ActorInterval(npc, 'angry')
    else:
        g = ActorInterval(npc, 'wave')
    h = Func(npc.loop, 'neutral')
    seq = Sequence(a, b, c, d, e, ee, f, g, h)
    if npc.getName() == 'Trap Cat':
        seq.append(Wait(3))
    seq.append(Func(npc.clearChat))
    if npc.getName() == 'Sans':
        sansTrack = Sequence()
        sansTrack.append(Func(npc.setChatAbsolute, "geeettttttt dunked on!!!", CFSpeech | CFTimeout)),
        seq.append(sansTrack)
    if npc.getName() == 'Papyrus':
        papyrusTrack = Sequence()
        papyrusTrack.append(Func(npc.setChatAbsolute, "THIS COG TOOK MY SPAGHETTI!", CFSpeech | CFTimeout)),
        seq.append(papyrusTrack)
    if npc.getName() == 'Magic Cat':
        magicCatTrack = Sequence()
        magicCatTrack.append(Func(npc.setChatAbsolute, "I've got this, so start dancing!", CFSpeech | CFTimeout))
        magicCatTrack.append(Func(attack['toon'].loop, 'victory'))
        seq.append(magicCatTrack)
    return seq
Exemple #5
0
 def announceGenerate(self):
     DistributedNPCToon.announceGenerate(self)
     LaughingManGlobals.addToonEffect(self)