Author Topic: Arena  (Read 5485 times)

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Arena
« on: January 18, 2010, 12:47:10 PM »
I've been making an arena for S_M's tournament out of the Low Lag arena. The gmf is fine, but I've been trying to add a zone for robots to be out if they are OOTA'd in the .py. The only problem is, i don't know how. Help would be appreciated.

Also, S_M wants to skin it, but because i have no idea how to skin something that doesn't have a bmp/tga, I am stuck. He wants the floor to be #4EEE94, and the walls to alternate between #8B0000 and #FF3300. If he can only have one colour, he would like #4EEE94.

Here's the gmf: http://pastebin.ca/1756362
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Madiaba

Re: Arena
« Reply #1 on: January 18, 2010, 08:12:04 PM »
G.K., you don't need to make a big SZ (which is a possibility), but rather do it in the py.

If OOTA-ed bot is/falls lower than floor, just get (y) location and then 'eliminate' bot.
Code: [Select]
    def __init__(self):
        self.players = ()
 
    def Activate(self, on):
        if on:  self.players = plus.getPlayers()       
        Arenas.SuperArena.Activate(self, on)
 
   def Tick(self):
      for each in self.players:
         if plus.getLocation(each)[1] < -6: # Adjust this parameter to floor height(s).
            plus.eliminatePlayer(each)


or if the floor is the same height inside and out, then use x and z to find outside the arena:
 
Code: [Select]
    def __init__(self):
        self.players = ()
 
    def Activate(self, on):
        if on:  self.players = plus.getPlayers()       
        Arenas.SuperArena.Activate(self, on)
 
   def Tick(self):
      for each in self.players:
          if plus.getLocation(each)[0] > abs(12)  or   plus.getLocation(each)[2] > abs(12)  # Adjust this parameter to arena size.
            plus.eliminatePlayer(each)

 
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Arena
« Reply #2 on: January 19, 2010, 12:46:10 AM »
Thnaks Mad. Do you know what I can do about the second point?
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline JoeBlo

Re: Arena
« Reply #3 on: January 19, 2010, 01:05:20 AM »
find

Code: [Select]
*MATERIAL_AMBIENT    0x8aff00
        *MATERIAL_DIFFUSE    0x8aff00
        *MATERIAL_SPECULAR    0xe5e5e5

for each object (the whole arena might be only 1 object though) and add in the Hex Colors you want,

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Arena
« Reply #4 on: January 19, 2010, 01:08:27 AM »
Thanks Joe.

In that case the Chinese Whispers may be ready to go as soon as SM gets back from his school.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline JoeBlo

Re: Arena
« Reply #5 on: January 19, 2010, 01:36:36 AM »
and providing S_M finishes off clarifying particular rules  ;)

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Arena
« Reply #6 on: January 19, 2010, 10:35:31 AM »
Hehe.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Squirrel_Monkey

  • Squirrel_Monkeyweight
  • *
  • Posts: 7587
  • Rep: 7
  • [Insert clever and witty comment here]
    • 0SquirrelMonkey0
    • View Profile
    • Awards
Re: Arena
« Reply #7 on: January 19, 2010, 10:47:42 AM »
and providing S_M finishes off clarifying particular rules  ;)
What rules may I ask?
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Arena
« Reply #8 on: January 19, 2010, 10:48:49 AM »
Hey, SM, get on Hamachi. I'll post my ideas for the rules there.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Arena
« Reply #9 on: January 19, 2010, 11:07:05 AM »
Guys, major problem. I start up the arena and find that it crashes the game. I can see the arena itself fine, so I presume the error's in the .py rather than the gmf. Here it is:
Code: [Select]
from __future__ import generators
import plus
import Arenas
import random
import Hazards
import math

class Box(Arenas.SuperArena):
    "Twiiiiiiiiiiiiiiiisted"
    name = "Twiiiiiiiiiiiiiisted Arena"
    preview = "twisted/twi_preview.bmp"
    game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH']
    extent = (-15, 15, 15, -15)

    def __init__(self):
        Arenas.SuperArena.__init__(self, "Arenas/twisted/twisted.gmf")
        #plus.Arena.__init__(self, "")
        plus.setBackColor(.36, .537, .788)
       
        degrad = 0.01745
        self.AddStaticCamera("Battle View", (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 AddShadowReceivers(self):
        self.SetShadowSource(5.897, 19.159, 5.899)
       
    def Activate(self, on):
        if on: self.players = plus.getPlayers()
       
        Arenas.SuperArena.Activate(self, on)

    def Tick(self):
       for each in self.players:
          if plus.getLocation(each)[-2] < -6: # Adjust this parameter to floor height(s).
             plus.eliminatePlayer(each)
       
Arenas.register(Box)
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Madiaba

Re: Arena
« Reply #10 on: January 19, 2010, 12:27:19 PM »
Edit: GK, indent the cameras...
 
Here:
Code: [Select]
from __future__ import generators
import plus
import Arenas
import random
import Hazards
import math
class Box(Arenas.SuperArena):
    "Twiiiiiiiiiiiiiiiisted"
    name = "Twiiiiiiiiiiiiiisted Arena"
    preview = "twisted/twi_preview.bmp"
    game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH']
    extent = (-15, 15, 15, -15)
    def __init__(self):
        Arenas.SuperArena.__init__(self, "Arenas/twisted/twisted.gmf")
        #plus.Arena.__init__(self, "")
        plus.setBackColor(.36, .537, .788)
       
        degrad = 0.01745
        self.AddStaticCamera("Battle View", (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 AddShadowReceivers(self):
        self.SetShadowSource(5.897, 19.159, 5.899)
       
    def Activate(self, on):
        if on: self.players = plus.getPlayers()
       
        Arenas.SuperArena.Activate(self, on)
    def Tick(self):
       for each in self.players:
          if plus.getLocation(each)[-2] < -6: # Adjust this parameter to floor height(s).
             plus.eliminatePlayer(each)
       
Arenas.register(Box)

Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Arena
« Reply #11 on: January 19, 2010, 12:29:49 PM »
Ok
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Arena
« Reply #12 on: January 19, 2010, 01:03:23 PM »
Still not appearing in list:
Code: [Select]
from __future__ import generators
import plus
import Arenas
import random
import Hazards
import math

class Box(Arenas.SuperArena):
    "Twiiiiiiiiiiiiiiiisted"
    name = "Twiiiiiiiiiiiiiisted Arena"
    preview = "twisted/twi_preview.bmp"
    game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH']
    extent = (-15, 15, 15, -15)

    def __init__(self):
        Arenas.SuperArena.__init__(self, "Arenas/twisted/twisted.gmf")
        #plus.Arena.__init__(self, "")
        plus.setBackColor(.36, .537, .788)
       
        degrad = 0.01745
        self.AddStaticCamera("Battle View", (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 AddShadowReceivers(self):
        self.SetShadowSource(5.897, 19.159, 5.899)
       
    def Activate(self, on):
        if on: self.players = plus.getPlayers()
       
        Arenas.SuperArena.Activate(self, on)

    def Tick(self):
       for each in self.players:
          if plus.getLocation(each)[-2] < -6: # Adjust this parameter to floor height(s).
             plus.eliminatePlayer(each)
       
Arenas.register(Box)
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Madiaba

Re: Arena
« Reply #13 on: January 19, 2010, 01:20:32 PM »
The indenting needs to be uniform under it's heading. The "self.players = ()" is still not under it's heading "def __init__(self):":
Code: [Select]
from __future__ import generators
import plus
import Arenas
import random
import Hazards
import math

class Box(Arenas.SuperArena):
    "Twiiiiiiiiiiiiiiiisted"
    name = "Twiiiiiiiiiiiiiisted Arena"
    preview = "twisted/twi_preview.bmp"
    game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH']
    extent = (-15, 15, 15, -15)

    def __init__(self):
        Arenas.SuperArena.__init__(self, "Arenas/twisted/twisted.gmf")
        #plus.Arena.__init__(self, "")
        plus.setBackColor(.36, .537, .788)
       
        degrad = 0.01745
        self.AddStaticCamera("Battle View", (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 AddShadowReceivers(self):
        self.SetShadowSource(5.897, 19.159, 5.899)
       
    def Activate(self, on):
        if on: self.players = plus.getPlayers()
       
        Arenas.SuperArena.Activate(self, on)

    def Tick(self):
       for each in self.players:
          if plus.getLocation(each)[-2] < -6: # Adjust this parameter to floor height(s).
             plus.eliminatePlayer(each)
       
Arenas.register(Box)

 
 

Line it up also with the cams.  Try this:
Code: [Select]
from __future__ import generators
import plus
import Arenas
import random
import Hazards
import math
class Box(Arenas.SuperArena):
    "Twiiiiiiiiiiiiiiiisted"
    name = "Twiiiiiiiiiiiiiisted Arena"
    preview = "twisted/twi_preview.bmp"
    game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH']
    extent = (-15, 15, 15, -15)
    def __init__(self):
        Arenas.SuperArena.__init__(self, "Arenas/twisted/twisted.gmf")
        #plus.Arena.__init__(self, "")
        plus.setBackColor(.36, .537, .788)
       
        degrad = 0.01745
        self.AddStaticCamera("Battle View", (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 AddShadowReceivers(self):
        self.SetShadowSource(5.897, 19.159, 5.899)
       
    def Activate(self, on):
        if on: self.players = plus.getPlayers()
       
        Arenas.SuperArena.Activate(self, on)
    def Tick(self):
       for each in self.players:
          if plus.getLocation(each)[-2] < -6: # Adjust this parameter to floor height(s).
             plus.eliminatePlayer(each)
       
Arenas.register(Box)



 
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Arena
« Reply #14 on: January 19, 2010, 01:27:37 PM »
It is still crashing even with that. At least it was on the list this time.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Madiaba

Re: Arena
« Reply #15 on: January 19, 2010, 01:32:16 PM »
Yes, that would keep it from loading.  I'll have time to look at it first hand later today, unless someone else helps you out first. 
In the mean time, if you want to send me all of the arena, I'll look over the rest too...(PM is fine).
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline Squirrel_Monkey

  • Squirrel_Monkeyweight
  • *
  • Posts: 7587
  • Rep: 7
  • [Insert clever and witty comment here]
    • 0SquirrelMonkey0
    • View Profile
    • Awards
Re: Arena
« Reply #16 on: January 19, 2010, 01:34:09 PM »
4th line from bottom looks wrong, is it?
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline Madiaba

Re: Arena
« Reply #17 on: January 19, 2010, 01:42:45 PM »
Thanks S_M, but that's ok.

But as I looked I saw a second issue:  No 'return' for 'Tick'.
Check 'file addresses' too.
Note: If you send the whole arena it'll be a lot easier to debug.
Try this:
Code: [Select]
from __future__ import generators
import plus
import Arenas
import random
import Hazards
import math
class Box(Arenas.SuperArena):
    "Twiiiiiiiiiiiiiiiisted"
    name = "Twiiiiiiiiiiiiiisted Arena"
    preview = "twisted/twi_preview.bmp"
    game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH']
    extent = (-15, 15, 15, -15)
    def __init__(self):
        Arenas.SuperArena.__init__(self, "Arenas/twisted/twisted.gmf")
        #plus.Arena.__init__(self, "")
        plus.setBackColor(.36, .537, .788)
       
        degrad = 0.01745
        self.AddStaticCamera("Battle View", (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 AddShadowReceivers(self):
        self.SetShadowSource(5.897, 19.159, 5.899)
       
    def Activate(self, on):
        if on: self.players = plus.getPlayers()
       
        Arenas.SuperArena.Activate(self, on)
    def Tick(self):
        for each in self.players:
            if plus.getLocation(each)[-2] < -6: # Adjust this parameter to floor height(s).
                plus.eliminatePlayer(each)
        return Arenas.SuperArena.Tick(self)
 
Arenas.register(Box)

Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline G.K.

  • *
  • Posts: 12156
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: Arena
« Reply #18 on: January 19, 2010, 02:02:29 PM »
Thanks Mad, the arena works now. However, the immobilization zone eliminates ione of the bots as soon as the match starts. Is is already on the y axis?
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Madiaba

Re: Arena
« Reply #19 on: January 19, 2010, 02:20:20 PM »
Yep,... now adjust as necessary.
Look in the gmf, or just start with -10 and go up from there, till you find the right working height.
 
----------------------------------

Edit: This is not right:
 if plus.getLocation(each)[-2] < -6: # Adjust this parameter to floor height(s).
 
This bracket designates which specific axis (x, y, or z) to find. 
x=[0]
y=[1]
z=[2]
 
Never seen -2 there, surprised it runs like that....
So you want:
   if plus.getLocation(each)[1] < -6: # Adjust this parameter to floor height(s).
 
--------
 
The '-6' is the number that will set the height of elimination, so adjust it:
   if plus.getLocation(each)[1] < -6: # Adjust this parameter to floor height(s).
 
 
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...