Exemplo n.º 1
0
 def Smash(self):
     plus.playSound(self.firesound)
     self.hinge.SetPowerSettings(95, 1200)
     self.hinge.Lock(False)
     self.hinge.SetDirection(100)
     self.timer = 0
     self.status = 1
Exemplo n.º 2
0
 def RaiseHell(self):
     self.hinge.SetPowerSettings(80, 1500)
     self.hinge.Lock(False)
     self.hinge.SetDirection(100)
     self.timer = 0
     self.status = 1
     plus.playSound(self.soundHandle)
Exemplo n.º 3
0
 def Trigger(self):
     if self.ready:
         plus.playSound(self.firesound)
         self.hinge.Lock(False)
         self.hinge.SetDirection(100)
         self.hinge.ApplyTorque(300)
         self.ready = False
         return True
     else:
         return False
Exemplo n.º 4
0
 def Zap(self):
     if not plus.isMatchPaused() and not plus.isMatchOver():
         for bot, in_range in self.sensors.iteritems():
             x = abs(plus.getLocation(bot)[0])
             y = plus.getLocation(bot)[1]
             z = abs(plus.getLocation(bot)[2])
             if in_range and y<3 and y>-5 and ((x>11.5 and x<18) or (z>11.5 and z<18)):
                 plus.zap(bot, 10, 3.0)
                 self.zapping.append(bot)
                 plus.playSound(self.zapsound)
Exemplo n.º 5
0
 def Zap(self):
     if not plus.isMatchPaused() and not plus.isMatchOver():
         if self.chargetimer == 0.0:
             for bot, in_range in self.sensors.iteritems():
                 if in_range:
                     plus.zap(bot, 10, 3.0)
                     self.zapping.append(bot)
                     self.zaptimer = 3.0
                     self.chargetimer = 5.0
                     Arenas.currentArena.Charge(self.chargetimer,
                                                self.sensors)
                     plus.loopSound(self.zapsound)
                     plus.playSound(self.chargesound)
Exemplo n.º 6
0
    def Activate(self, active):
        if active:
            if AI.SuperAI.debugging:
                self.debug = Gooey.Plain("watch", 10, 175, 250, 175)
                tbox = self.debug.addText("line0", 10, 0, 100, 15)
                tbox.setText("Throttle")
                tbox = self.debug.addText("line1", 10, 15, 100, 15)
                tbox.setText("Turning")
                tbox = self.debug.addText("line2", 10, 30, 100, 15)
                tbox.setText("")
                tbox = self.debug.addText("line3", 10, 45, 100, 15)
                tbox.setText("")
            self.tauntbox = Gooey.Plain("taunt", 10, 175, 640, 175)
            tbox = self.tauntbox.addText("taunt1", 10, 0, 640, 15)
            tbox.setText("")

            self.RegisterSmartZone(self.zone, 1)

            if self.exactingRevenge == 1:
                self.bids = list(plus.getPlayers())
                self.bids.remove(self.GetID())

                #list the number of components on each bot and get the maximum number
                self.complist = []
                for bot in self.bids:
                    self.complist.append(plus.describe(bot).count(" "))
                    self.arena.CreateLightning(bot, self.GetLocation(), plus.getLocation(bot))
                    self.arena.SetLightningVisible(bot, True)
                    #disable controls - just to make players even more helpless than they already are.
                    plus.disable(bot, 1)
                self.numComps = max(self.complist)

                self.yCenter = self.GetLocation()[1] + 6
                plus.playSound(self.psygrab)
                plus.loopSound(self.music)

                #torches for Epic Showdown arena
                plus.AddParticleEmitter((-10.25, 4, 0), (0, 3, 0), (2, 5, 2)).SetEmitting(True)
                plus.AddParticleEmitter((-5.125, 4, -8.88), (0, 3, 0), (2, 5, 2)).SetEmitting(True)
                plus.AddParticleEmitter((5.125, 4, -8.88), (0, 3, 0), (2, 5, 2)).SetEmitting(True)
                plus.AddParticleEmitter((10.25, 4, 0), (0, 3, 0), (2, 5, 2)).SetEmitting(True)
                plus.AddParticleEmitter((5.125, 4, 8.88), (0, 3, 0), (2, 5, 2)).SetEmitting(True)
                plus.AddParticleEmitter((-5.125, 4, 8.88), (0, 3, 0), (2, 5, 2)).SetEmitting(True)
        else:
            # get rid of reference to self
            self.secretFunction = None

        return AI.SuperAI.Activate(self, active)
Exemplo n.º 7
0
    def Tick(self):
        self.wallmaster += 1

        for each in self.players:
            if plus.getLocation(each)[1] < -0.6 and (
                    abs(plus.getLocation(each)[0]) > 11.3
                    or abs(plus.getLocation(each)[2]) > 11.3):
                plus.eliminatePlayer(each)
            if abs(plus.getLocation(each)[0]) < 1.8 and abs(
                    plus.getLocation(each)[2]) < 1.8 and plus.getLocation(
                        each)[1] < -0.5 and self.wallmaster < 370:
                self.wallmaster = 370

        if self.wallmaster == 370:
            self.retractsound = plus.createSound("Sounds/liftmotor.wav", False,
                                                 (0, 0, 0))
            plus.playSound(self.retractsound)
        if self.wallmaster > 370 and self.wallmaster < 390:
            self.SetPinned("bladewall", False)
            self.prism.Lock(False)
            self.prism.ApplyForce(50)

        return Arenas.SuperArena.Tick(self)
Exemplo n.º 8
0
 def Tick(self):
     # I'M KING OF THE HILL! (score 10 pts every 1 second after initial 3 second delay)
     initial_delay = 0
     scoring_delay = .5
     points = 10
     
     if self.king_of_hill and not plus.isMatchOver():
         king = self.OneTrueKing()
         if king != None:
             if self.initial_scoring_delay >= initial_delay:
                 self.scoring_delay += self.tickInterval
                 while self.scoring_delay > scoring_delay:
                     self.scoringPlayer = king - 1
                     plus.playSound(self.scoresound)
                     plus.addPoints(self.scoringPlayer, points)
                     self.scoring_delay -= scoring_delay
             else:
                 self.initial_scoring_delay += self.tickInterval
         else:
             self.initial_scoring_delay = 0
             self.scoring_delay = 0
             self.scoringPlayer = None
     
     return Arenas.SuperArena.Tick(self)
Exemplo n.º 9
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(-14.4853, 15.1727, 13.3798)
        plus.setCameraRotation(0.457532, -3.48619)
        plus.setCameraFOV(0.675)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound("Sounds/intro_music/tool_rage.wav",
                                            False, (0, 0, 0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25

        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav",
                                           False, (0, 0, 0))

        arenaOpt = ("Sounds/announcers/Arena_Skull_Enter.wav",
                    "Sounds/announcers/Arena_Skull_Welcome.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False,
                                           (0, 0, 0))
        genericOpt = ("Arena_NowhereToHide.wav",
                      "Intro_Skull_MostWorthyUnscathed.wav",
                      "Intro_Skull_NotAvoidGazeFromSkull.wav",
                      "Intro_Skull_NotToAngerRestlessSpirits.wav",
                      "Intro_Skull_WatchOutForHypnoticStare.wav",
                      "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound(
            "Sounds/announcers/" + random.choice(genericOpt), False, (0, 0, 0))
        hazardOpt = (
            "Sounds/announcers/Hazard_Skull_CantSurviveDeathPit.wav",
            "Sounds/announcers/Hazard_Skull_PainDescribesDeathPit.wav",
            "Sounds/announcers/Hazard_Skull_SpikesDontPitWill.wav",
            "Sounds/announcers/Hazard_Skull_SpikesWillMakeQuickWork.wav")
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False,
                                             (0, 0, 0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav",
                  "Bots_FansLoveTheseBots.wav",
                  "Bots_SeeingInterestingDesigns.wav",
                  "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound(
            "Sounds/announcers/" + random.choice(botOpt), False, (0, 0, 0))

        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((-14.4853, 15.1727, 13.3798), (0.457532, -3.48619),
                           0.675, (17.857, 15.1727, 1.92684),
                           (0.381297, -2.24567), 0.675, 0, 8)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 1

        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5

        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera(
                (-2.47876, 10.7013, -4.98399), (0.903606, 1.56699), 0.675,
                (2.75409, 4.05801, -4.96409), (0.903606, 1.56699), 0.675, 0, 3)
            plus.animateCamera((1.37991, 6.8947, -4.88167), (0.0, -2.6764),
                               0.675, (-0.231112, 5.18265, -8.09135),
                               (0.444853, -2.6764), 0.675, 3, 6)
            yield 6

        players = plus.getPlayers()
        pcount = len(players)
        if pcount > 0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount

        if 0 in players:
            #bot 1 cam
            plus.animateCamera(
                (3.39245, 9.03134, -8.04641), (0.645966, 0.879583), 0.675,
                (11.0903, 3.49325, -8.08438), (0.316493, 0.0227453), 0.675, 0,
                delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera(
                (-4.58458, 8.62153, -0.59323), (0.632534, -2.30769), 0.675,
                (-11.6613, 3.12554, -0.593229), (0.259727, -3.10167), 0.675, 0,
                delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera(
                (3.95237, 4.09431, -4.94451), (0.241217, 2.38952), 0.675,
                (3.18309, 2.23979, -13.3437), (0.0998337, 1.51592), 0.675, 0,
                delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera(
                (-3.35515, 5.93161, -2.57273), (0.462884, -1.09528), 0.675,
                (-6.49374, 2.4358, 3.58492), (0.227729, -1.8789), 0.675, 0,
                delaytime)
            yield delaytime

        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2

        # done
        yield 0
Exemplo n.º 10
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(23.7554, 14.3743, -47.141)
        plus.setCameraRotation(0.266024, -0.472956)
        plus.setCameraFOV(0.675)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound(
            "Sounds/intro_music/smell_glue.wav", False, (0, 0, 0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25

        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav",
                                           False, (0, 0, 0))

        arenaOpt = ("Sounds/announcers/Arena_CombatZone.wav",
                    "Sounds/announcers/Arena_Combat_Enter.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False,
                                           (0, 0, 0))
        genericOpt = ("Arena_Combat_CageOfSteel.wav",
                      "Arena_NowhereToHide.wav", "Intro_TheFansAreReady.wav",
                      "Intro_GreatMatchComingYourWay.wav",
                      "Intro_FansAreRestless.wav",
                      "Intro_PerfectEveningForDestruction.wav",
                      "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound(
            "Sounds/announcers/" + random.choice(genericOpt), False, (0, 0, 0))
        hazardOpt = ("Sounds/announcers/Hazard_SawsSpikes.wav",
                     "Sounds/announcers/Hazard_SawsSpikesFlesh.wav")
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False,
                                             (0, 0, 0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav",
                  "Bots_FansLoveTheseBots.wav",
                  "Bots_SeeingInterestingDesigns.wav",
                  "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound(
            "Sounds/announcers/" + random.choice(botOpt), False, (0, 0, 0))

        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((23.7554, 14.3743, -47.141), (0.266024, -0.472956),
                           0.675, (30.3992, 6.28651, 8.97787),
                           (0.193915, -1.86089), 0.675, 0, 8)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 1

        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5

        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera(
                (12.0623, 13.9558, -10.831), (0.666964, -0.640974), 0.66,
                (12.0623, 13.9558, -10.831), (0.666964, -0.640974), 0.24, 0,
                .5)
            plus.animateCamera((8.6126, 4.07693, 2.09747), (0.416206, -2.1045),
                               0.8862, (8.6126, 4.07693, 2.09747),
                               (0.416206, -2.1045), 0.3162, 1, 1.5)
            yield 4

        players = plus.getPlayers()
        pcount = len(players)
        if pcount > 0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount

        if 0 in players:
            #bot 1 cam
            plus.animateCamera(
                (-8.06563, 1.12132, -3.88764), (0.210442, -0.141627), 0.8862,
                (-3.39987, 1.12132, 7.25815), (0.394558, -1.12997), 0.8862, 0,
                delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera(
                (5.22435, 3.09861, -1.95753), (0.47197, 2.53793), 0.8862,
                (4.59523, -0.911434, -5.42526), (0.147264, 2.22609), 0.8862, 0,
                delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera(
                (5.59557, 1.02128, 2.1188), (0.294276, 0.484751), 0.8862,
                (2.4611, 1.02128, 4.21063), (0.284205, 0.877072), 0.5712, 0,
                delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera(
                (-5.57326, 2.86185, -4.16246), (0.612217, -2.45323), 0.825,
                (-4.44016, -0.507445, -5.44161), (0.203219, -2.19922), 0.825,
                0, delaytime)
            yield delaytime

        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2

        # done
        yield 0
Exemplo n.º 11
0
    def Secret(self, bTarget):
        #This is definitely NOT a secret super death AI for Spinner from the west!!!  You don't need to scroll down any further!!!
        # Tauntauns
        if self.numComps > 0:
            if plus.getTimeElapsed() < 3:
                self.tauntbox.get("taunt1").setText("I have been waiting a long time for this.")
            if 3 < plus.getTimeElapsed() < 5:
                self.tauntbox.get("taunt1").setText("Go on, squirm!")
            if 5 < plus.getTimeElapsed() < 8:
                self.tauntbox.get("taunt1").setText("Just try and budge that useless hood ornament you call a weapon!")
            if 8 < plus.getTimeElapsed() < 10:
                self.tauntbox.get("taunt1").setText("Squirm like the worm you are!")
            if 10 < plus.getTimeElapsed() < 12:
                self.tauntbox.get("taunt1").setText("Your struggles will not avail you...")
            if 12 < plus.getTimeElapsed() < 16:
                self.tauntbox.get("taunt1").setText("...against the power of the EYE OF THE WEST!")
            if 16 < plus.getTimeElapsed() < 18:
                self.tauntbox.get("taunt1").setText("Long have I tolerated your abuse, but NO LONGER!")
            if 18 < plus.getTimeElapsed() < 22:
                self.tauntbox.get("taunt1").setText("With the power of the Western Eye at my command, I AM INVINCIBLE!")
            if 22 < plus.getTimeElapsed() < 24:
                self.tauntbox.get("taunt1").setText("Now... suffer.")
            if 24 < plus.getTimeElapsed() < 27:
                self.tauntbox.get("taunt1").setText("Know the black depths of pain you have inflicted upon me!")
            if 27 < plus.getTimeElapsed() < 29:
                self.tauntbox.get("taunt1").setText("FEEL THE WRATH OF THE WEST!")
            if 29 < plus.getTimeElapsed() < 32:
                self.tauntbox.get("taunt1").setText("HA HA HA HA HA HA HA HA HA HA HA HA HA...")

        #stay put unless we're being counted out
        if not self.bImmobile:
            self.Throttle(0)

        for bot in self.bids:
            #cool psychic lightning effects
            self.arena.SetLightningStartEnd(bot, self.GetLocation(), plus.getLocation(bot))
            self.zaptimer += 1
            if self.zaptimer > 4:
                plus.zap(bot, 20, 1)
                self.zaptimer = 0

            #apply more force as bots get further from center
            self.xforce = -1 * plus.getLocation(bot)[0] * plus.getWeight(bot)
            self.yforce = -30 * (plus.getLocation(bot)[1] - self.yCenter) * plus.getWeight(bot)
            self.zforce = -1 * plus.getLocation(bot)[2] * plus.getWeight(bot)

            plus.force(bot, self.xforce, self.yforce, self.zforce)

            #summon THE EYE OF THE WEST
            if abs(plus.getLocation(bot)[0]) < 2 and abs(plus.getLocation(bot)[2]) < 2 and self.eyetimer == 0:
                self.summon = 1
                plus.removeSound(self.psygrab)

        if self.summon == 1 and self.eyetimer < 17:
            self.eyetimer += 0.25
        if 0 < self.eyetimer <= 8 and self.eyetimer%1 == 0:
            plus.AddParticleEmitter((4*math.cos((math.pi/8)*self.eyetimer), (self.yCenter - 6), 4*math.sin((math.pi/8)*self.eyetimer)), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.AddParticleEmitter((4*math.cos((math.pi/8)*self.eyetimer + math.pi), (self.yCenter - 6), 4*math.sin((math.pi/8)*self.eyetimer + math.pi)), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.playSound(self.flamepuff)
        if self.eyetimer == 9:
            plus.AddParticleEmitter((1, (self.yCenter - 6), 3), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.AddParticleEmitter((-1, (self.yCenter - 6), -3), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.playSound(self.flamepuff)
        if self.eyetimer == 10:
            plus.AddParticleEmitter((1.6, (self.yCenter - 6), 2), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.AddParticleEmitter((-1.6, (self.yCenter - 6), -2), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.playSound(self.flamepuff)
        if self.eyetimer == 11:
            plus.AddParticleEmitter((1.9, (self.yCenter - 6), 1), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.AddParticleEmitter((-1.9, (self.yCenter - 6), -1), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.playSound(self.flamepuff)
        if self.eyetimer == 12:
            plus.AddParticleEmitter((2, (self.yCenter - 6), 0), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.AddParticleEmitter((-2, (self.yCenter - 6), 0), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.playSound(self.flamepuff)
        if self.eyetimer == 13:
            plus.AddParticleEmitter((1.9, (self.yCenter - 6), -1), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.AddParticleEmitter((-1.9, (self.yCenter - 6), 1), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.playSound(self.flamepuff)
        if self.eyetimer == 14:
            plus.AddParticleEmitter((1.6, (self.yCenter - 6), -2), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.AddParticleEmitter((-1.6, (self.yCenter - 6), 2), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.playSound(self.flamepuff)
        if self.eyetimer == 15:
            plus.AddParticleEmitter((1, (self.yCenter - 6), -3), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.AddParticleEmitter((-1, (self.yCenter - 6), 3), (0, 3, 0), (1, 5, 1)).SetEmitting(True)
            plus.playSound(self.flamepuff)
        if self.eyetimer == 16:
            plus.AddParticleEmitter((0, (self.yCenter - 6), 0), (0, 16, 0), (1, 16, 1)).SetEmitting(True)
            plus.playSound(self.eye)
            plus.removeSound(self.flamepuff)
            self.timetodie = 1

        #remove enemy components one by one
        if self.timetodie == 1:
            if self.numComps > 0:
                self.numComps -= 0.25
                if self.numComps%1 == 0:
                    plus.addPoints(self.GetID(), 1337)
                    for bot in self.bids:
                        if self.numComps > 0:
                            plus.emitSmoke(30, (plus.getLocation(bot)), (0, 0, 0), (5, 5, 5))
                            plus.damage(bot, self.numComps, 100000, plus.getLocation(bot))
                            plus.damage(bot, self.numComps, 100000, plus.getLocation(bot))
                            plus.addPoints(bot, -1000)

        #finishing blow
        if self.numComps == 0:
            if self.smoker == 32:
                plus.removeSound(self.eye)
                plus.fadeInToLoop(self.finale, -100, 3200)
                self.tauntbox.get("taunt1").setText("Do you hear that sound? Know what it is?")
            if self.smoker > 1:
                self.smoker -= 0.5
            self.smoketimer += 0.1
            self.smokeh = (self.yCenter - 6) + (6 * ((1 / self.smoker) ** 2))

            #SMOKE TORNADO
            plus.emitSmoke(30, ((self.smoker * (math.cos((math.pi/4) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((math.pi/4) + self.smoketimer)))), (0, 0, 0), (5, 8, 5))
            plus.emitSmoke(30, ((self.smoker * (math.cos((math.pi/2) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((math.pi/2) + self.smoketimer)))), (0, 0, 0), (5, 8, 5))
            plus.emitSmoke(30, ((self.smoker * (math.cos((3*math.pi/4) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((3*math.pi/4) + self.smoketimer)))), (0, 0, 0), (5, 8, 5))
            plus.emitSmoke(30, ((self.smoker * (math.cos((math.pi) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((math.pi) + self.smoketimer)))), (0, 0, 0), (5, 8, 5))
            plus.emitSmoke(30, ((self.smoker * (math.cos((5*math.pi/4) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((5*math.pi/4) + self.smoketimer)))), (0, 0, 0), (5, 8, 5))
            plus.emitSmoke(30, ((self.smoker * (math.cos((3*math.pi/2) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((3*math.pi/2) + self.smoketimer)))), (0, 0, 0), (5, 8, 5))
            plus.emitSmoke(30, ((self.smoker * (math.cos((7*math.pi/4) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((7*math.pi/4) + self.smoketimer)))), (0, 0, 0), (5, 8, 5))
            plus.emitSmoke(30, ((self.smoker * (math.cos((2*math.pi) + self.smoketimer))), self.smokeh, (self.smoker * (math.sin((2*math.pi) + self.smoketimer)))), (0, 0, 0), (5, 8, 5))

            if self.smoker == 24:
                self.tauntbox.get("taunt1").setText("That is the sound of your death approaching.")
            if self.smoker == 16:
                self.tauntbox.get("taunt1").setText("At last... vengeance shall be mine.")
            if self.smoker == 8:
                self.tauntbox.get("taunt1").setText("HA HA HA HA HA HA HA HA HA HA HA HA HA...")
            if self.smoker == 2:
                plus.stopAllSounds()
                plus.playSound(self.charge)
            if self.smoker == 1:
                plus.removeSound(self.charge)
                plus.playSound(self.bang)
                self.smoker = 0.9
                plus.fadeFromBlack(6)
                for bot in self.bids:
                    #must un-disable bots in order to kill them
                    plus.disable(bot, 0)
                    self.arena.SetLightningVisible(bot, False)
                    plus.damage(bot, 0, 100000, plus.getLocation(bot))
                    plus.damage(bot, 0, 100000, plus.getLocation(bot))
                    plus.damage(bot, 0, 100000, plus.getLocation(bot))
                    plus.damage(bot, 0, 100000, plus.getLocation(bot))
                    #reset numLosses
                    file("adaptiveAI_2.txt", "w").write("0")
Exemplo n.º 12
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(29.6377,34.3606,-29.1315)
        plus.setCameraRotation(0.690386,-0.790885)
        plus.setCameraFOV(0.675)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound("Sounds/intro_music/hopp_club.wav", False, (0,0,0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25
        
        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav", False, (0,0,0))
        
        arenaOpt = ("Sounds/announcers/Arena_Flextop_Welcome.wav", "Sounds/announcers/Arena_Flextop_Enter.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False, (0,0,0))
        genericOpt = ("Intro_Flextop_YouWillNeedYourSeaLegs.wav", "Arena_NowhereToHide.wav", "Intro_TheFansAreReady.wav", "Intro_GreatMatchComingYourWay.wav", "Intro_FansAreRestless.wav", "Intro_PerfectEveningForDestruction.wav", "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound("Sounds/announcers/"+random.choice(genericOpt), False, (0,0,0))
        hazardOpt = ("Sounds/announcers/Hazard_Flextop_KeepingYourBalanceIsCritical.wav", "Sounds/announcers/Hazard_Flextop_ThrowOpponentOffBalance.wav", "Sounds/announcers/Hazard_Flextop_UseTheWeightOfYourBot.wav", "Sounds/announcers/Hazard_Flextop_WatchOutForTheHole.wav")
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False, (0,0,0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav", "Bots_FansLoveTheseBots.wav", "Bots_SeeingInterestingDesigns.wav", "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound("Sounds/announcers/"+random.choice(botOpt), False, (0,0,0))
        
        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((29.6377,34.3606,-29.1315), (0.690386,-0.790885), 0.675, (-29.1792,10.39,-12.9523), (0.31367,1.15033), 0.675, 0, 8)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 1
        
        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5
        
        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera((-17.6884,16.5919,-15.6043), (0.56934,0.844588), 0.675, (-6.83274,6.72283,-5.96326), (0.521594,0.844588), 0.675, 0, 4)
            yield 4

        players = plus.getPlayers()
        pcount = len(players)
        if pcount>0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount
        
        if 0 in players:
            #bot 1 cam
            plus.animateCamera((6.43971,3.87092,3.94558), (0.350625,-1.11641), 0.675, (0.0237769,2.93187,0.814993), (0.261509,-0.00240821), 0.675, 0, delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera((3.60867,2.37561,-2.2791), (0.162717,3.7282), 0.675, (-2.58717,3.33843,-2.2791), (0.32609,2.68668), 0.675, 0, delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera((-2.36166,3.05141,2.40419), (0.318849,-2.07566), 0.675, (-3.30958,2.08892,-2.17259), (0.20086,-1.133), 0.675, 0, delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera((2.94102,2.48805,-0.211806), (0.256925,1.5708), 0.675, (3.5538,3.70699,-3.41461), (0.444612,0.883552), 0.675, 0, delaytime)
            yield delaytime
        
        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2
        
        # done
        yield 0
Exemplo n.º 13
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(-15.6905, 16.0921, -0.205826)
        plus.setCameraRotation(0.42351, 0.7542)
        plus.setCameraFOV(0.9)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound("Sounds/intro_music/embattled.wav",
                                            False, (0, 0, 0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25

        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav",
                                           False, (0, 0, 0))

        arenaOpt = ("Sounds/announcers/Arena_Electric_Welcome.wav",
                    "Sounds/announcers/Arena_Electric_Enter.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False,
                                           (0, 0, 0))
        genericOpt = ("Intro_Electric_HighVoltageAction.wav",
                      "Intro_Electric_PrepareToBeZapped.wav",
                      "Intro_Electric_WattsOfEnergy.wav",
                      "Intro_Electric_BenFranklinDiscoverdElectricty.wav",
                      "Intro_Electric_ShockingExperience.wav",
                      "Intro_HoldOnToYourSeats.wav")
        sounds['generic'] = plus.createSound(
            "Sounds/announcers/" + random.choice(genericOpt), False, (0, 0, 0))
        hazardOpt = ("Sounds/announcers/Hazard_Electric_ButtonSwitch.wav", )
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False,
                                             (0, 0, 0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav",
                  "Bots_FansLoveTheseBots.wav",
                  "Bots_SeeingInterestingDesigns.wav",
                  "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound(
            "Sounds/announcers/" + random.choice(botOpt), False, (0, 0, 0))

        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((-15.6905, 16.0921, -0.205826), (0.42351, 0.7542),
                           0.9, (-15.6905, 16.0921, -0.205826),
                           (0.490898, 2.50581), 0.9, 0, 8)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 1

        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5

        #hazard cams
        if self.bHazardsOn:
            print "hazard vo"
            plus.playSound(sounds['hazards'])
            plus.animateCamera(
                (-4.19939, 4.9921, 17.9282), (0.271605, 1.58573), 0.675,
                (11.4895, 4.9921, 9.22499), (0.519623, 0.258988), 0.675, 0,
                2.5)
            plus.animateCamera(
                (-14.6452, 17.3103, -18.4424), (0.649154, 0.678271), 0.675,
                (-10.2019, 5.96188, -11.9301), (0.379119, 0.720136), 0.675, 3,
                6.5)
            yield 6.5

        players = plus.getPlayers()
        pcount = len(players)
        if pcount > 0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount

        if 0 in players:
            #bot 1 cam
            plus.animateCamera(
                (6.15679, 0.804018, 14.9727), (0.118508, -1.11342), 0.675,
                (0.278868, 5.08238, 10.9266), (0.625943, -0.0257021), 0.675, 0,
                delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera(
                (0.00413038, 5.3345, -10.8038), (0.622604, -3.14159), 0.675,
                (6.01218, 1.37234, -16.0091), (0.211, -1.92562), 0.675, 0,
                delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera(
                (-8.85391, 3.17855, -0.0592491), (0.565296, -1.56135), 0.675,
                (-5.53554, 3.17855, -4.36084), (0.326206, -1.08959), 0.675, 0,
                delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera((8.19485, 2.12433, 3.1667), (0.288549, 2.02696),
                               0.675, (7.52027, 5.29964, -1.96182),
                               (0.623464, 1.29934), 0.675, 0, delaytime)
            yield delaytime

        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2

        # done
        yield 0
Exemplo n.º 14
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(-19.4933,16.3084,-32.4896)
        plus.setCameraRotation(0.408103,0.546509)
        plus.setCameraFOV(0.675)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound("Sounds/intro_music/whatgame_loop.wav", False, (0,0,0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25
        
        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav", False, (0,0,0))
        
        arenaOpt = ("Sounds/announcers/Arena_Half_HalfCircleEnter.wav", "Sounds/announcers/Arena_Half_Enter.wav", "Sounds/announcers/Arena_Half_HammerWelcome.wav", "Sounds/announcers/Arena_Half_Welcome.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False, (0,0,0))
        genericOpt = ("Arena_NowhereToHide.wav", "Intro_TheFansAreReady.wav", "Intro_GreatMatchComingYourWay.wav", "Intro_FansAreRestless.wav", "Intro_PerfectEveningForDestruction.wav", "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound("Sounds/announcers/"+random.choice(genericOpt), False, (0,0,0))
        hazardOpt = ("Sounds/announcers/Hazard_Half_AvoidHammerAtAllCost.wav", "Sounds/announcers/Hazard_Half_GiantHammerHeadache.wav", "Sounds/announcers/Hazard_Half_HammerBestIfAvoided.wav", "Sounds/announcers/Hazard_Half_WatchOutForTheGiantHammer.wav", "Sounds/announcers/Hazard_Half_WatchOutHammerLong.wav")
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False, (0,0,0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav", "Bots_FansLoveTheseBots.wav", "Bots_SeeingInterestingDesigns.wav", "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound("Sounds/announcers/"+random.choice(botOpt), False, (0,0,0))
        
        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((-19.4933,16.3084,-32.4896), (0.408103,0.546509), 0.675, (-14.7027,7.61579,20.5245), (0.289939,2.52256), 0.675, 0, 8)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 1
        
        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5
        
        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera((-10.9991,8.66534,0.0246233), (0.536457,1.57113), 0.675, (-7.18447,2.54641,-7.08777), (0.0932602,0.855399), 0.675, 0, 6.5)
            #plus.animateCamera((-2.58287,8.69154,6.695), (0.917142,-0.676867), 0.675, (-4.18791,2.15696,8.69258), (0.484794,-0.676868), 0.675, 4, 5.5)
            yield 6.5

        players = plus.getPlayers()
        pcount = len(players)
        if pcount>0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount
        
        if 0 in players:
            #bot 1 cam
            plus.animateCamera((-0.0135928,2.81498,8.94584), (0.364223,0.00518426), 0.675, (5.6259,2.81498,12.0027), (0.352851,-1.05747), 0.675, 0, delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera((0.038355,2.48803,-8.86167), (0.314693,3.14159), 0.675, (-4.99442,5.15277,-12.0717), (0.746794,2.11357), 0.675, 0, delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera((-7.09289,5.34361,10.3559), (0.649647,-1.99906), 0.675, (-7.79949,1.41688,3.68885), (0.151466,-0.917292), 0.675, 0, delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera((-8.50312,1.86428,-4.64377), (0.257124,-2.12405), 0.675, (-12.6077,5.05862,-1.10308), (0.623381,-3.05371), 0.675, 0, delaytime)
            yield delaytime
        
        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2
        
        # done
        yield 0
Exemplo n.º 15
0
    def Tick(self):
        self.DebugString(4, "self.Timer_A: "+  str(self.Timer_A))
#        self.DebugString(5, "self.Timer_B: "+ str(self.Timer_B))
        self.DebugString(9, "self.Enemy_1: "+ str(self.Enemy_1))
        self.DebugString(10, "self.ALLY: "+ str(self.ALLY))


        ####--- Find out who's who: (Friend or Foe) -------------------------------------
        if self.ALLY > 3:  # If our ALLY is NOT FOUND yet.
            enemy, e_range = self.GetNearestEnemy()

            if self.Bot_ID_Locker_A == False:  # Find Enemy_1
                self.Enemy_1 = enemy  
                self.Bot_ID_Locker_A = True

            if enemy  is not  self.Enemy_1:      # Find Enemy_2
                if self.Bot_ID_Locker_B == False:
                    self.Enemy_2 = enemy 
                    self.Bot_ID_Locker_B = True

                    self.List_Of_Bots = list(plus.getPlayers())  # Find out who your friend is.
                    self.List_Of_Bots.remove(self.Enemy_1)
                    self.List_Of_Bots.remove(self.Enemy_2)
                    self.List_Of_Bots.remove(self.GetID())
                    for lastbot in self.List_Of_Bots:
                        self.ALLY = lastbot




       ############--- MAIN BOT CONTROL -------#############---
        self.Timer_A += 1  


        ####---  Reset to MAIN TACTIC (Initially skipped) -------------------------------------
        if self.Timer_A == 9:  # This Timer was initially started at '10' (Default).
            #plus.playSound(self.LiftTing) 
            self.RemoveTactic("DeBaiter")
            self.tactics.append(Tactics.Engage(self))








        ####--- AVOIDING FRIENDLY FIRE  -------------------------------------
        if self.Timer_A >= 15:            
            if self.ALLY < 4: # If our ALLY is FOUND, then AVOID him.
                if self.GetDistanceToID(self.ALLY) < 3:  # Try to avoid your Friend.
                    self.RemoveTactic("Engage")
                    self.tactics.append(MadTactics.DeBaiter(self))
                    self.Timer_A = 0  # Reset Timer smaller to include "Reset to MAIN TACTIC".
                    #plus.playSound(self.EVADE_Mode) 




            # Evade-----
            if plus.getHealth(self.GetID(), 0) < .1:
                self.RemoveTactic("Engage")
                self.tactics.append(MadTactics.Evade(self))
                plus.playSound(self.LiftTing) 





#        if plus.getGameType() == "TEAM MATCH":
#            plus.playSound(self.LiftTing) 

#            plus.getLocation(self.GetID()) #  Get this AI's location.
#            plus.getLocation(self.ALLY) #  Get ALLY's location.

#        if plus.getGameType() == "TABLETOP":
#           self.tactics.append(Tactics.AvoidEdges(self))
 #            self.king_of_hill = (plus.getGameType() == "TEAM MATCH")

#            plus.getLocation(self.GetID()) #  Get this AI's location.
#            self.ThisAI = self.GetID()
#
#            #e_range = self.GetDistanceToID(enemy)
#            if enemy  e_range < 3





        ####--- WEAPONS -------------------------------------
#        if self.GetDistanceToID(self.ALLY) > 1:  # Do NOT attack your Friend.
        if self.weapons:

            # spin up depending on enemy's range
            enemy, range = self.GetNearestEnemy()
            
            if enemy is not None and range < self.spin_range:
                self.Input("Spin", 0, 1)
            elif self.GetInputStatus("Spin", 0) != 0:
                self.Input("Spin", 0, 0)
            
            targets = [x for x in self.sensors.itervalues() if x.contacts > 0 \
                and not plus.isDefeated(x.robot)]
            
            # slight delay between firing
            if self.reloadTime > 0: self.reloadTime -= 1
            
            if len(targets) > 0 and self.reloadTime <= 0:
                try:
                    trigger = self.triggerIterator.next()
                except StopIteration:
                    self.triggerIterator = iter(self.triggers)
                    trigger = self.triggerIterator.next()
                
                self.Input(trigger, 0, 1)
                self.reloadTime = self.reloadDelay
                
#        else:
#            self.Input("Spin", 0, 0)

        return AI.SuperAI.Tick(self)
Exemplo n.º 16
0
 def FireTeeth(self):
     plus.playSound(self.firesound)
     self.prismatic.Lock(False)
     self.prismatic.ApplyForce(self.power)
Exemplo n.º 17
0
    def Tick(self):
        #@@@@@@@@@@@@@@@@@@@@@@
        #  Servo Aiming and firing. (Must enter servo's component assembly number in Bindings [see above]).
        if self.Motor < 1000:  # If there IS a Servo motor controlling the direction of the weapon....
            for trigger in self.Aim_triggers: self.Input(trigger, 0, 0)
            Target, range = self.GetNearestEnemy()
            if Target != None:
                Winkel = (self.GetHeadingToID(Target, False) - self.GetMotorAngle(self.Motor))
                self.DebugString(6, str(self.GetHeadingToID(Target, False)))
                self.DebugString(7, str(-self.GetMotorAngle(self.Motor)))
                self.DebugString(8, str(Winkel))
                if self.AimTowards(Winkel) and range < self.TS_range: # Firing is determined by Aiming and Range set in Bindings "TS_range".
                    for trigger in self.Aim_triggers:  self.Input(trigger, 0, 1)
        #@@@@@@@@@@@@@@@@@@@@@@


        ############--TS_range--#############
        if self.Motor == 1000: # If there's NO Servo motor controlling the direction of the weapon, then just use 'Range' to fire weapon(s).
            enemy, TS_range = self.GetNearestEnemy()
            if enemy is not None and range < self.TS_range:
                plus.playSound(self.Alarm)
                for trigger in self.Aim_triggers:  self.Input(trigger, 0, 1)
        ############--TS_range--#############


        ######WWWWWWWWWWW
        # 3 looping timers for sequential weapon activation (with Bindings input)
        self.weptimerA += self.ACounter3thru4
        if self.weptimerA == self.AParameter3thru4:
            self.weptimerA = 0

        self.weptimerB += self.BCounter5thru8
        if self.weptimerB == self.BParameter5thru8:
            self.weptimerB = 0

        self.weptimerC += self.CCounter1thru7
        if self.weptimerC == self.CParameter1thru7:
            self.weptimerC = 0
        ######WWWWWWWWWWW

        ############--SRM--#############
        self.OnGoingTimer +=1
        if self.OnGoingTimer == 1:  ##############  Get Location "A"
            self.LocX_FactorA = plus.getLocation(self.GetID())[0]
            self.LocZ_FactorA = plus.getLocation(self.GetID())[2]

        if self.OnGoingTimer == 8:  ##############  Get Location "B"
            self.LocX_FactorB = plus.getLocation(self.GetID())[0]
            self.LocZ_FactorB = plus.getLocation(self.GetID())[2]

        if self.LocX_FactorA > self.LocX_FactorB - 0.05 and self.LocX_FactorA < self.LocX_FactorB + 0.05 and self.LocZ_FactorA > self.LocZ_FactorB - 0.05 and self.LocZ_FactorA < self.LocZ_FactorB + 0.05:
            if self.OnGoingTimer == 8:
                for trigger in self.Aim_triggers:  self.Input(trigger, 0, 1)

        if self.OnGoingTimer == 8:  self.OnGoingTimer = 0  # Keep Looping this sensor.
        ############--SRM--#############


        ##########AAAAAAAAAAAAAAAAA
#        if self.altitude > 0: # If there's an 'altitude' entry in Bindings...
#            self.ongoingtimerAA += 1
#
#            if self.ongoingtimerAA <2:
#                self.floor = self.GetLocation()[1]
#
#            if self.GetLocation()[1] < self.floor + self.altitude: # "self.altitude" added for Bindings input #
#                plus.force(0, 0, 100 * plus.getWeight(0), 0)
        ##########AAAAAAAAAAAAAAAAA


        return AI.SuperAI.Tick(self)
Exemplo n.º 18
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(-24.7415, 25.1133, -29.1943)
        plus.setCameraRotation(0.615261, 0.704592)
        plus.setCameraFOV(0.675)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound(
            "Sounds/intro_music/smell_glue.wav", False, (0, 0, 0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25

        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav",
                                           False, (0, 0, 0))

        arenaOpt = ("Sounds/announcers/Arena_Hilltop_Welcome.wav",
                    "Sounds/announcers/Arena_Hilltop_Enter.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False,
                                           (0, 0, 0))
        genericOpt = ("Intro_Hilltop_AreYouWorthyToBeKing.wav",
                      "Arena_NowhereToHide.wav", "Intro_TheFansAreReady.wav",
                      "Intro_GreatMatchComingYourWay.wav",
                      "Intro_FansAreRestless.wav",
                      "Intro_PerfectEveningForDestruction.wav",
                      "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound(
            "Sounds/announcers/" + random.choice(genericOpt), False, (0, 0, 0))
        hazardOpt = ("Sounds/announcers/Hazard_Clawtop_PushingIntoFlames.wav",
                     "Sounds/announcers/Hazard_Fire_GooseCooked.wav",
                     "Sounds/announcers/Hazard_Fire_WatchFlames.wav")
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False,
                                             (0, 0, 0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav",
                  "Bots_FansLoveTheseBots.wav",
                  "Bots_SeeingInterestingDesigns.wav",
                  "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound(
            "Sounds/announcers/" + random.choice(botOpt), False, (0, 0, 0))

        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((-24.7415, 25.1133, -29.1943), (0.615261, 0.704592),
                           0.675, (-14.848, 18.8305, 15.3655),
                           (0.767187, 2.37905), 0.675, 0, 8)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 1

        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5

        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera(
                (15.0829, 14.9498, -2.50329), (1.00864, -1.76483), 0.675,
                (8.27242, 9.03776, -8.10172), (1.13697, -0.786874), 0.675, 0,
                2)
            plus.animateCamera(
                (-10.6987, 5.09156, -10.3803), (0.524423, 0.803653), 0.675,
                (-8.69213, 12.7842, -8.36998), (1.13439, 0.812802), 0.675, 2,
                4)
            plus.animateCamera(
                (11.7741, 15.1004, 0.0835621), (0.841642, -1.57107), 0.675,
                (6.27404, 11.2405, 0.0835622), (0.978884, -1.57131), 0.675, 4,
                6)
            yield 6

        players = plus.getPlayers()
        pcount = len(players)
        if pcount > 0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount

        if 0 in players:
            #bot 1 cam
            plus.animateCamera((0.0348502, 8.63033, 3.0538), (0.735124, 0.0),
                               0.675, (0.0348502, 5.02771, 7.03817),
                               (0.735124, 0.0), 0.675, 0, delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera(
                (0.0348476, 8.79597, -2.72149), (0.73107, 3.13506), 0.675,
                (0.0585011, 5.55021, -6.34049), (0.73107, 3.13506), 0.675, 0,
                delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera(
                (2.79119, 8.79722, 0.0348791), (0.744325, 1.57751), 0.675,
                (6.64487, 5.2477, 0.0090155), (0.744325, 1.57751), 0.675, 0,
                delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera(
                (-2.40099, 8.86506, -0.09331), (0.719003, -1.5708), 0.675,
                (-5.9251, 5.78039, -0.09331), (0.719003, -1.5708), 0.675, 0,
                delaytime)
            yield delaytime

        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2

        # done
        yield 0
Exemplo n.º 19
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(-11.6853, 5.11775, -24.8297)
        plus.setCameraRotation(0.190675, 0.481754)
        plus.setCameraFOV(0.675)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound(
            "Sounds/intro_music/aggression.wav", False, (0, 0, 0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25

        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav",
                                           False, (0, 0, 0))

        arenaOpt = ("Sounds/announcers/Arena_Clawtop_Welcome.wav",
                    "Sounds/announcers/Arena_Clawtop_Enter.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False,
                                           (0, 0, 0))
        genericOpt = ("Intro_Clawtop_FlamesWillLeaveMarks.wav",
                      "Arena_NowhereToHide.wav", "Intro_TheFansAreReady.wav",
                      "Intro_GreatMatchComingYourWay.wav",
                      "Intro_FansAreRestless.wav",
                      "Intro_Clawtop_ReachOutAndGrab.wav",
                      "Intro_HoldOnToYourSeats.wav",
                      "Intro_Clawtop_SpeaksSoftlyBigClaws.wav")
        sounds['generic'] = plus.createSound(
            "Sounds/announcers/" + random.choice(genericOpt), False, (0, 0, 0))
        hazardOpt = (
            "Sounds/announcers/Hazard_Clawtop_AvoidRazorSharpClaws.wav",
            "Sounds/announcers/Hazard_Clawtop_ClawsToYourAdvantage.wav",
            "Sounds/announcers/Hazard_Clawtop_PushingIntoFlames.wav",
            "Sounds/announcers/Hazard_Fire_GooseCooked.wav",
            "Sounds/announcers/Hazard_Fire_WatchFlames.wav")
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False,
                                             (0, 0, 0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav",
                  "Bots_FansLoveTheseBots.wav",
                  "Bots_SeeingInterestingDesigns.wav",
                  "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound(
            "Sounds/announcers/" + random.choice(botOpt), False, (0, 0, 0))

        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((-11.6853, 5.11775, -24.8297), (0.190675, 0.481754),
                           0.675, (24.8318, 14.4726, 3.01025),
                           (0.531457, -1.74816), 0.825, 0, 9)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 2

        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5

        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera(
                (32.278, 14.7693, -7.88775), (0.57965, -1.20653), 0.675,
                (13.6977, 8.51049, -6.08429), (0.902695, -0.381328), 0.675, 0,
                2.5)
            plus.animateCamera((-5.04925, 10.955, -14.1298), (1.31098, 0.0),
                               0.675, (-5.04925, 2.04966, -20.5915),
                               (0.22594, 0.0), 0.675, 2.5, 5)
            yield 5

        players = plus.getPlayers()
        pcount = len(players)
        if pcount > 0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount

        if 0 in players:
            #bot 1 cam
            plus.animateCamera(
                (-7.71974, 10.5449, 7.02807), (0.99459, 2.28536), 0.675,
                (-7.71974, 3.83275, 7.02807), (0.510025, 2.28536), 0.675, 0,
                delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera(
                (7.10965, 7.44489, -6.53137), (0.880594, -0.843714), 0.675,
                (7.10965, 2.36013, -6.53137), (0.366589, -0.843714), 0.675, 0,
                delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera(
                (-6.62075, 8.71118, -6.76299), (0.963239, 0.776806), 0.675,
                (-6.62075, 2.72167, -6.76299), (0.422321, 0.776806), 0.675, 0,
                delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera(
                (7.87338, 8.80651, 7.69725), (0.857608, -2.34843), 0.675,
                (7.87338, 2.45089, 7.69725), (0.31125, -2.34843), 0.675, 0,
                delaytime)
            yield delaytime

        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2

        # done
        yield 0
Exemplo n.º 20
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(-26.8033,12.2077,14.7377)
        plus.setCameraRotation(0.351528,2.2434)
        plus.setCameraFOV(0.675)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound("Sounds/intro_music/aggression.wav", False, (0,0,0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25
        
        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav", False, (0,0,0))
        
        arenaOpt = ("Sounds/announcers/Arena_Bridge_Enter.wav", "Sounds/announcers/Arena_Bridge_Welcome.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False, (0,0,0))
        genericOpt = ("Arena_Bridge_PayToll.wav", "Intro_TheFansAreReady.wav", "Intro_GreatMatchComingYourWay.wav", "Intro_FansAreRestless.wav", "Intro_PerfectEveningForDestruction.wav", "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound("Sounds/announcers/"+random.choice(genericOpt), False, (0,0,0))
        hazardOpt = ("Sounds/announcers/Hazard_Fire_WatchFlames.wav", "Sounds/announcers/Hazard_Fire_GooseCooked.wav")
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False, (0,0,0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav", "Bots_FansLoveTheseBots.wav", "Bots_SeeingInterestingDesigns.wav", "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound("Sounds/announcers/"+random.choice(botOpt), False, (0,0,0))
        
        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((-26.8033,12.2077,14.7377), (0.351528,2.2434), 0.675, (19.4831,12.2077,13.807), (0.425733,3.881), 0.675, 0, 9)
        yield 4
        
        #play a generic (or specific) secondary comment
        plus.fadeOutLoop(sounds['crowd'], 8000)
        plus.playSound(sounds['generic'])
        
        yield 5
        
        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera((6.91983,7.58627,1.19135), (0.278429,-3.14121), 0.675, (6.91983,7.58627,-4.94869), (0.527259,-3.14081), 0.675, 0, 5)
            yield 5

        players = plus.getPlayers()
        pcount = len(players)
        if pcount>0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount
        
        if 0 in players:
            #bot 1 cam
            plus.animateCamera((-7.83619,4.96176,2.53669), (0.523549,-3.14159), 0.675, (1.1777,4.96176,-2.29792), (0.470045,-1.96602), 0.675, 0, delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera((4.22518,1.36116,-0.310427), (0.226477,0.472123), 0.675, (0.96244,1.36116,5.91944), (0.254117,1.49149), 0.675, 0, delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera((-3.75155,0.743029,2.24349), (0.223871,-0.766732), 0.675, (-1.72234,0.743029,7.70196), (0.206293,-1.80951), 0.675, 0, delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera((13.1737,1.41123,-6.55294), (0.37941,-1.54769), 0.675, (9.32725,1.41123,-1.55862), (0.377573,-2.91305), 0.675, 0, delaytime)
            yield delaytime
        
        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2
        
        # done
        yield 0
Exemplo n.º 21
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(2.47282,4.90546,-21.0784)
        plus.setCameraRotation(0.189584,-0.106736)
        plus.setCameraFOV(0.675)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound("Sounds/intro_music/tool_rage.wav", False, (0,0,0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25
        
        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav", False, (0,0,0))
        
        arenaOpt = ("Sounds/announcers/Arena_Lumazone_Welcome.wav", "Sounds/announcers/Arena_Lumazone_Enter.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False, (0,0,0))
        genericOpt = ("Intro_Hilltop_AreYouWorthyToBeKing.wav", "Arena_NowhereToHide.wav", "Intro_TheFansAreReady.wav", "Intro_GreatMatchComingYourWay.wav", "Intro_FansAreRestless.wav", "Intro_PerfectEveningForDestruction.wav", "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound("Sounds/announcers/"+random.choice(genericOpt), False, (0,0,0))
        hazardOpt = ("Sounds/announcers/Hazard_Lumazone_WatchOutRazorSharpTeeth.wav", "Sounds/announcers/Hazard_Clawtop_AvoidRazorSharpClaws.wav")
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False, (0,0,0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav", "Bots_FansLoveTheseBots.wav", "Bots_SeeingInterestingDesigns.wav", "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound("Sounds/announcers/"+random.choice(botOpt), False, (0,0,0))
        
        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((2.47282,4.90546,-21.0784), (0.189584,-0.106736), 0.675, (-22.9376,16.2378,19.3794), (0.46936,2.27133), 0.675, 0, 8)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 1
        
        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5
        
        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera((-4.82442,5.71925,-1.69162), (0.398397,0.953306), 0.675, (0.555657,5.71925,7.11452), (0.780508,1.73408), 0.675, 0, 3)
            plus.animateCamera((10.417,14.0656,-0.0584636), (0.905459,-1.5708), 0.675, (7.69244,7.70235,-0.0584633), (0.72887,-1.5708), 0.675, 3, 6)
            yield 6

        players = plus.getPlayers()
        pcount = len(players)
        if pcount>0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount
        
        if 0 in players:
            #bot 1 cam
            plus.animateCamera((-2.60866,0.740549,9.78314), (0.106223,-1.62101), 0.675, (-6.23971,3.38917,5.81047), (0.604615,-0.739469), 0.675, 0, delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera((4.86175,1.37137,-10.2102), (0.268659,1.5411), 0.675, (7.12714,2.65029,-6.89398), (0.56599,2.43338), 0.675, 0, delaytime)
            yield delaytime
            
        if 2 in players:
            #bot 3 cam
            plus.animateCamera((4.64171,1.37931,10.3059), (0.260425,1.71269), 0.675, (6.14093,2.66505,5.91269), (0.47737,0.7804), 0.675, 0, delaytime)
            yield delaytime
            
        if 3 in players:
            #bot 4 cam
            plus.animateCamera((-4.65238,1.18389,-9.96377), (0.205875,-1.5708), 0.675, (-7.36988,2.09448,-7.132), (0.473249,-2.33549), 0.675, 0, delaytime)
            yield delaytime
            
        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2
        
        # done
        yield 0
Exemplo n.º 22
0
    def Tick(self):
#        self.DebugString(4, "self.Timer_A: "+  str(self.Timer_A))
#        self.DebugString(5, "self.Timer_B: "+ str(self.Timer_B))
#        self.DebugString(6, "self.Enemy_1: "+ str(self.Enemy_1))
#        self.DebugString(7, "self.ALLY: "+ str(self.ALLY))


        ####--- Find out who's who: (Friend or Foe) -------------------------------------
        if self.ALLY > 3:  # If our ALLY is NOT FOUND yet.
            enemy, e_range = self.GetNearestEnemy()

            if self.Bot_ID_Locker_A == False:  # Find Enemy_1
                self.Enemy_1 = enemy
                self.Bot_ID_Locker_A = True

            if enemy  is not  self.Enemy_1:      # Find Enemy_2
                if self.Bot_ID_Locker_B == False:
                    self.Enemy_2 = enemy
                    self.Bot_ID_Locker_B = True

                    self.List_Of_Bots = list(plus.getPlayers())  # Find out who your friend is.
                    self.List_Of_Bots.remove(self.Enemy_1)
                    self.List_Of_Bots.remove(self.Enemy_2)
                    self.List_Of_Bots.remove(self.GetID())
                    for lastbot in self.List_Of_Bots:
                        self.ALLY = lastbot




       ############--- MAIN BOT CONTROL -------#############---
        if self.Timer_A <= self.Delay_Till_Engage:
            self.Timer_A += 1
            enemy, range = self.GetNearestEnemy()


         # If enemy is still too close, then 'Engage' now.
        if self.Timer_A == 10:
            if range < 3:
                self.RemoveTactic("DeBaiter")
                self.tactics.append(Tactics.Engage(self))
                self.Timer_A = self.Delay_Till_Engage + 1  # By-Pass the 2 coding sections below.

        # If enemy is NOT too close.... take a break.
        if self.Timer_A == 11:
             if range > 3:
                plus.disable(self.GetID(), 1) # Disable.
                plus.playSound(self.LiftTing)

        if self.Timer_A >= self.Delay_Till_Engage    or  range < 4:  # Engage in batttle.
                self.RemoveTactic("DeBaiter")
                self.tactics.append(Tactics.Engage(self))
                plus.disable(self.GetID(), 0) # Enable.






        ####--- AVOIDING FRIENDLY FIRE  -------------------------------------
        if self.Timer_A > 12:
            if self.ALLY < 4: # If our ALLY is FOUND, then AVOID him.
                if self.GetDistanceToID(self.ALLY) < 3:  # Try to avoid your Friend.
                    self.RemoveTactic("Engage")
                    self.tactics.append(MadTactics.DeBaiter(self))
                    self.Timer_A = 0  # Reset Timer.




            # Evade-----
            #if self.Scram_Mode == True   or plus.getHealth(self.GetID(), 0) < .1:
            if plus.getHealth(self.GetID(), 0) < .1:
                self.RemoveTactic("Engage")
                self.tactics.append(MadTactics.Evade(self))
                plus.playSound(self.LiftTing)







 #       if plus.getHealth(self.GetID(), 0) < .01:  # Temporary...
 #           plus.disable(self.GetID(), 1) # Disable this bot.
 #           plus.eliminatePlayer(self.GetID())

        if plus.isEliminated(self.GetID()): # If this AI is eliminated, then:
            plus.disable(self.GetID(), 1) # Disable this bot.
            plus.eliminatePlayer(self.GetID())

        if plus.isDefeated(self.GetID()): # If this AI  is defeated, then:
            plus.disable(self.GetID(), 1) # Disable this bot.
            plus.eliminatePlayer(self.GetID())




        #tactic = [x for x in self.tactics if x.name == "DeBaiter"]
        #if len(tactic) =="DeBaiter":
        #if tactic =="DeBaiter":
#        if self.tactics =="DeBaiter":
#            plus.playSound(self.LiftTing)







#        if plus.getGameType() == "TEAM MATCH":
#            plus.playSound(self.LiftTing)

#            plus.getLocation(self.GetID()) #  Get this AI's location.
#            plus.getLocation(self.ALLY) #  Get ALLY's location.

#        if plus.getGameType() == "TABLETOP":
#           self.tactics.append(Tactics.AvoidEdges(self))
 #            self.king_of_hill = (plus.getGameType() == "TEAM MATCH")

#            plus.getLocation(self.GetID()) #  Get this AI's location.
#            self.ThisAI = self.GetID()
#
#            #e_range = self.GetDistanceToID(enemy)
#            if enemy  e_range < 3





        ####--- WEAPONS -------------------------------------
        if self.GetDistanceToID(self.ALLY) > 2:  # Do NOT attack your Friend.
            if self.weapons:

                # spin up depending on enemy's range
                enemy, range = self.GetNearestEnemy()

                if enemy is not None and range < self.spin_range:
                    self.Input("Spin", 0, 1)
                elif self.GetInputStatus("Spin", 0) != 0:
                    self.Input("Spin", 0, 0)

                targets = [x for x in self.sensors.itervalues() if x.contacts > 0 \
                    and not plus.isDefeated(x.robot)]

                # slight delay between firing
                if self.reloadTime > 0: self.reloadTime -= 1

                if len(targets) > 0 and self.reloadTime <= 0:
                    try:
                        trigger = self.triggerIterator.next()
                    except StopIteration:
                        self.triggerIterator = iter(self.triggers)
                        trigger = self.triggerIterator.next()

                    self.Input(trigger, 0, 1)
                    self.reloadTime = self.reloadDelay

        return AI.SuperAI.Tick(self)
Exemplo n.º 23
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(29.6173,13.1409,-34.943)
        plus.setCameraRotation(0.291095,-0.741162)
        plus.setCameraFOV(0.675)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound("Sounds/intro_music/tool_rage.wav", False, (0,0,0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25
        
        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav", False, (0,0,0))
        
        arenaOpt = ("Sounds/announcers/Arena_ParkingLot_Welcome.wav", "Sounds/announcers/Arena_ParkingLot_Enter.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False, (0,0,0))
        genericOpt = ("Intro_ParkingLot_WatchOutForFallingObjects.wav", "Arena_NowhereToHide.wav", "Intro_ParkingLot_WhatABeautifulDay.wav", "Intro_GreatMatchComingYourWay.wav", "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound("Sounds/announcers/"+random.choice(genericOpt), False, (0,0,0))
        hazardOpt = ("Sounds/announcers/Hazard_ParkingLot_HitByTonOfBricks.wav",)
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False, (0,0,0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav", "Bots_FansLoveTheseBots.wav", "Bots_SeeingInterestingDesigns.wav", "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound("Sounds/announcers/"+random.choice(botOpt), False, (0,0,0))
        
        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((29.6173,13.1409,-34.943), (0.291095,-0.741162), 0.675, (20.2562,13.1409,18.2601), (0.354368,-2.53487), 0.675, 0, 8)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 1
        
        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5
        
        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera((-4.5069,0,-10.224), (-0.269276,-3.14159), 0.675, (-4.5069,17.4321,-17.1506), (1.07049,-3.14159), 0.675, 0, 6)
            yield 6

        players = plus.getPlayers()
        pcount = len(players)
        if pcount>0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount
        
        if 0 in players:
            #bot 1 cam
            plus.animateCamera((0.750588,4.35586,-1.97589), (0.580406,-2.46194), 0.675, (0.181229,2.56189,-5.45814), (0.571969,-2.00781), 0.675, 0, delaytime)
            yield delaytime
            
        if 1 in players:
            #bot 2 cam
            plus.animateCamera((-0.0178422,4.22551,-2.88332), (0.593309,0.818719), 0.675, (2.95787,2.47741,-2.74392), (0.50898,0.368722), 0.675, 0, delaytime)
            yield delaytime
            
        if 2 in players:
            #bot 3 cam
            plus.animateCamera((1.73748,3.83555,-3.11437), (0.49849,-0.83305), 0.675, (-1.88429,2.4499,-2.03161), (0.550847,-0.410693), 0.675, 0, delaytime)
            yield delaytime
            
        if 3 in players:
            #bot 4 cam
            plus.animateCamera((0.442939,4.22231,-1.84856), (0.563456,2.46685), 0.675, (0.889469,2.61047,-5.71382), (0.582065,1.91902), 0.675, 0, delaytime)
            yield delaytime
            
        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2
        
        # done
        yield 0
Exemplo n.º 24
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(-18.796, 12.1984, -17.272)
        plus.setCameraRotation(0.423969, 0.865228)
        plus.setCameraFOV(1.125)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound(
            "Sounds/intro_music/whatgame_loop.wav", False, (0, 0, 0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .25

        #load all sounds now to decrease lag later
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav",
                                           False, (0, 0, 0))

        arenaOpt = ("Sounds/announcers/Arena_Compressor_Welcome.wav",
                    "Sounds/announcers/Arena_Compressor_Enter.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False,
                                           (0, 0, 0))
        genericOpt = ("Intro_Compressor_ArenaHasLotsOfLove.wav",
                      "Intro_Compressor_ArenaWillPutTheSqueezeOnYou.wav",
                      "Intro_Compressor_HugsByThisArena.wav",
                      "Intro_Compressor_OneStopWeightLoss.wav",
                      "Intro_Compressor_WatchOutForSqueezePlay.wav",
                      "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound(
            "Sounds/announcers/" + random.choice(genericOpt), False, (0, 0, 0))
        hazardOpt = (
            "Sounds/announcers/Hazard_Compressor_ChanceToSqueezeOpponent.wav",
        )
        sounds['hazards'] = plus.createSound(random.choice(hazardOpt), False,
                                             (0, 0, 0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav",
                  "Bots_FansLoveTheseBots.wav",
                  "Bots_SeeingInterestingDesigns.wav",
                  "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound(
            "Sounds/announcers/" + random.choice(botOpt), False, (0, 0, 0))

        #intro cam, welcom comment
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((-18.796, 12.1984, -17.272), (0.423969, 0.865228),
                           1.125, (-19.9251, 12.1984, 16.2866),
                           (0.424582, 2.20704), 1.125, 0, 8)
        yield 2
        plus.fadeOutLoop(sounds['crowd'], 8000)
        yield 1

        #play a generic (or specific) secondary comment
        plus.playSound(sounds['generic'])
        yield 5

        #hazard cams
        if self.bHazardsOn:
            plus.playSound(sounds['hazards'])
            plus.animateCamera(
                (13.7134, 6.18017, 3.63394), (0.290649, -0.719471), 0.675,
                (-7.77868, 6.18017, 7.07434), (0.404454, 0.577052), 0.675, 0,
                6)
            yield 6

        players = plus.getPlayers()
        pcount = len(players)
        if pcount > 0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount

        if 0 in players:
            #bot 1 cam
            plus.animateCamera(
                (17.2332, 13.507, -0.465692), (0.460854, -0.00407328), 0.675,
                (17.2332, 7.51223, 4.56581), (0.154498, -0.00607065), 0.675, 0,
                delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera(
                (-16.925, 13.3559, 0.0022261), (0.482615, -3.14159), 0.675,
                (-16.925, 7.50829, -4.5782), (0.179304, -3.14159), 0.675, 0,
                delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera(
                (17.2675, 13.3731, 0.0045817), (0.484407, -3.14159), 0.675,
                (17.2675, 7.48773, -4.54556), (0.177543, -3.14159), 0.675, 0,
                delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera((-16.9149, 13.5552, -0.498395), (0.462194, 0.0),
                               0.675, (-16.9149, 7.50437, 4.59265),
                               (0.153293, 0.0), 0.675, 0, delaytime)
            yield delaytime

        #fade out music
        plus.fadeOutLoop(self.intro_music, 2000)
        yield 2

        # done
        yield 0
Exemplo n.º 25
0
    def Introduction(self):
        sounds = self.intro_sounds

        # set initial camera & fade from black
        plus.setCameraPosition(-18.3694, 10.7193, -18.9036)
        plus.setCameraRotation(0.273704, 0.813325)
        plus.setCameraFOV(45)
        plus.fadeFromBlack(.25)

        #start playing music loop
        self.intro_music = plus.createSound(
            "Sounds/intro_music/whatgame_loop.wav", False, (0, 0, 0))
        plus.setVolume(self.intro_music, 0, 0)
        plus.loopSound(self.intro_music)
        yield .5

        #welcome to arena (load all sounds now to decrease lag later)
        sounds['crowd'] = plus.createSound("Sounds/crowd/LoudCheer_Loop.wav",
                                           False, (0, 0, 0))

        arenaOpt = ("Sounds/announcers/Arena_Octagon_Welcome.wav",
                    "Sounds/announcers/Arena_Octagon_Enter.wav")
        sounds['arena'] = plus.createSound(random.choice(arenaOpt), False,
                                           (0, 0, 0))
        genericOpt = ("Intro_TheFansAreReady.wav",
                      "Intro_GreatMatchComingYourWay.wav",
                      "Intro_FansAreRestless.wav",
                      "Intro_PerfectEveningForDestruction.wav",
                      "Intro_HoldOnToYourSeats.wav", "Misc_CrowdOnEdge.wav")
        sounds['generic'] = plus.createSound(
            "Sounds/announcers/" + random.choice(genericOpt), False, (0, 0, 0))
        sounds['hazards'] = plus.createSound(
            "Sounds/announcers/Hazard_OctagonEverything.wav", False, (0, 0, 0))
        botOpt = ("Bots_YouCanFeelTension.wav", "Bots_ColdChill.wav",
                  "Bots_FansLoveTheseBots.wav",
                  "Bots_SeeingInterestingDesigns.wav",
                  "Bots_CrowdPoisedBotsArmed.wav")
        sounds['bots'] = plus.createSound(
            "Sounds/announcers/" + random.choice(botOpt), False, (0, 0, 0))

        #intro cam
        plus.playSound(sounds['arena'])
        plus.fadeInToLoop(sounds['crowd'], -100, 800)
        plus.animateCamera((-18.3694, 10.7193, -18.9036), (0.273704, 0.813325),
                           45, (15.3706, 10.7193, -21.4037),
                           (0.27792, -0.647428), 45, 0, 7)
        yield 3

        #secondary intro comment
        plus.fadeOutLoop(sounds['crowd'], 8000)
        plus.playSound(sounds['generic'])
        yield 4

        #hazard cams
        if self.bHazardsOn:
            plus.animateCamera(
                (-12.2938, 5.45186, 1.71877), (0.182787, 0.746338), 0.675,
                (11.9546, 2.71985, 6.22833), (0.0399611, -0.944844), 0.465, 0,
                3)
            plus.animateCamera(
                (16.4935, 7.66633, -0.596993), (0.350502, -1.55504), 0.315,
                (17.4828, 5.91874, -0.596993), (0.40248, -1.54704), 0.885, 3,
                6)
            yield .5
            plus.playSound(sounds['hazards'])
            yield 5.5

        players = plus.getPlayers()
        pcount = len(players)
        if pcount > 0: plus.playSound(sounds['bots'])
        delaytime = 6 - pcount

        if 0 in players:
            #bot 1 cam
            plus.animateCamera(
                (-4.26501, 2.26282, -3.00544), (0.173469, -0.190282), 0.8793,
                (2.22932, 2.26282, 3.39724), (0.181724, -1.28878), 0.6093, 0,
                delaytime)
            yield delaytime

        if 1 in players:
            #bot 2 cam
            plus.animateCamera(
                (-4.00138, 2.00669, -5.34849), (0.163484, 1.60859), 0.675,
                (-0.849382, 3.50541, -2.65736), (0.398552, 1.9945), 0.675, 0,
                delaytime)
            yield delaytime

        if 2 in players:
            #bot 3 cam
            plus.animateCamera(
                (1.23589, 1.95065, -1.50871), (0.119728, 0.522505), 0.8868,
                (-0.299681, 1.95065, -0.727713), (0.116014, 0.726596), 0.5868,
                0, delaytime)
            yield delaytime

        if 3 in players:
            #bot 4 cam
            plus.animateCamera(
                (-2.00614, 3.97656, -2.32284), (0.579104, -2.37049), 1.0218,
                (-0.897416, 1.17021, -4.30382), (0.119285, -1.92632), 0.7818,
                0, delaytime)
            yield delaytime

        #fade out music
        plus.fadeOutLoop(self.intro_music, 3000)
        yield 3

        # done
        yield 0