from __future__ import generatorsimport plusimport Arenasimport randomimport Hazardsimport mathclass Box(Arenas.SuperArena): "In space, no one can hear you scream... as your bot's components are brutally torn off with magic Python powers." name = "Ironbot Space" preview = "cube/cube_preview.bmp" game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH'] extent = (-16, 16, 16, -16) def __init__(self): Arenas.SuperArena.__init__(self, "Arenas/cube/ironbotspace.gmf") #plus.Arena.__init__(self, "") plus.setBackColor(0, 0, 0) degrad = 0.01745 self.AddStaticCamera("Battle Veiw", (19.5, 15, 19.5), (50*degrad,225*degrad), 55*degrad) self.AddStaticCamera("High Flipper View", (-19.5, 45, -19.5), (48*degrad,45*degrad), 84*degrad) self.AddStaticCamera("Birds Eye View", (0, 45, 0), (90*degrad,0), 75*degrad) self.AddWatchCamera("Combat Cam", (-12, 8, 12), (16, 36, 65*degrad, 30*degrad)) self.AddWatchCamera("Aerial Cam", (-19.5, 35, -19.5), (50, 60, 45*degrad, 60*degrad)) self.AddWatchCamera("Ground Cam", (8, -5, -8), (15, 40, 75*degrad, 35*degrad)) self.AddWatchCamera("Spectator Cam", (13, 15, 13), (6, 18, 45*degrad, 45*degrad)) self.players = () def Introduction(self): self.LostComps0 = eval(open("Bot0_comps.txt").read()) for id in self.LostComps0: plus.damage(0, id, 1000, plus.getLocation(0)) plus.damage(0, id, 1000, plus.getLocation(0)) self.LostComps1 = eval(open("Bot1_comps.txt").read()) for id in self.LostComps1: plus.damage(1, id, 1000, plus.getLocation(1)) plus.damage(1, id, 1000, plus.getLocation(1)) yield 0 def Activate(self, on): if on: self.players = plus.getPlayers() Arenas.createArenaByName("Containment Cube") Arenas.SuperArena.Activate(self, on) Arenas.register(Box)
try: Arenas.createArenaByName("Containment Cube")except: pass
You got my vote for RA2 Wizard. Always and forever.
Arenas.createArenaByName("Combat Arena")
Arenas.currentArena.Activate(self, on)
import Arenasimport plusimport timedef switch_to_arena(arenaname, on): plus.gravity(0, 10, 0) origtick = Arenas.currentArena.Tick start = time.clock() def hooktick(*args): now = time.clock() if ((now-start) > 1): switch_to_arena2(arenaname, on) return origtick() Arenas.currentArena.Tick = hooktickdef switch_to_arena2(arenaname, on): Arenas.createArenaByName(arenaname) Arenas.currentArena.Activate(on) plus.gravity(0, -10, 0)
Though I suspect that apanx used the same technique as me, I must say that my way is extremely sloppy and would require quite a few tweaks to the main arena PY and possibly GMF. I've also yet to figure out a way of getting the hammer's zone to work after the change. I would strongly suggest using Madiaba's method instead...Similar to how Mad did the Matrix Arena, you can add the walls, floor, and ceiling separately (using self.AddXtra or self.AddXtraSound). All that needs to be loaded at the beginning are the startpoints, zones, and hinges. As long as you use some fancy camera work during the introduction, people won't even notice the difference between this method and the use of Arenas.createArenaByName.