gametechmods
Robot Arena => General Support => Topic started by: G.K. 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 (http://pastebin.ca/1756362)
-
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.
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:
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)
-
Thnaks Mad. Do you know what I can do about the second point?
-
find
*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,
-
Thanks Joe.
In that case the Chinese Whispers may be ready to go as soon as SM gets back from his school.
-
and providing S_M finishes off clarifying particular rules ;)
-
Hehe.
-
and providing S_M finishes off clarifying particular rules ;)
What rules may I ask?
-
Hey, SM, get on Hamachi. I'll post my ideas for the rules there.
-
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:
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)
-
Edit: GK, indent the cameras...
Here:
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)
-
Ok
-
Still not appearing in list:
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)
-
The indenting needs to be uniform under it's heading. The "self.players = ()" is still not under it's heading "def __init__(self):":
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: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)
-
It is still crashing even with that. At least it was on the list this time.
-
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).
-
4th line from bottom looks wrong, is it?
-
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: 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)
-
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?
-
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).
-
Ah, thanks again Mad
-
It works at last. Thanks to Mad, Joe and Duck (his tutorial helped). Joe, S_M's also updated the rules.
-
4th line from bottom looks wrong, is it?
It was
-
Does the arenna work though?
-
4th line from bottom looks wrong, is it?
It was
You are right, S_M. I didn't look at the 'empty space' as a line, and thus checked the line above it. Nice job.
-
Does it matter? The arena appears to work.
-
But as I looked I saw a second issue: No 'return' for 'Tick'.
as soon as I saw the py, I fixed that up and posted the fixed one... seems I missed this page though and you already beat me to it lol I should really look ahead to see if there was another page rather then "trusting" were the forum places me :mrgreen:
-
Your code for eliminating bots needs to be indented one more space--it's just slightly out of line.
Computers can be really nitpicky.
Try this.
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)
Edit: AHH there's a second page! Looks like I'm too late. Oh well.
But as I looked I saw a second issue: No 'return' for 'Tick'.
as soon as I saw the py, I fixed that up and posted the fixed one... seems I missed this page though and you already beat me to it lol I should really look ahead to see if there was another page rather then "trusting" were the forum places me :mrgreen:
*Twilight Zone music*
-
Thanks anyway Click.
-
DP Bump
How do I make the cameras zoom in more?
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))
-
Anyone?
-
Here, GK. These are some of my own py notes: https://gametechmods.com/uploads/files/2799PYTHON SCRIPTS.rar (https://gametechmods.com/uploads/files/2799PYTHON SCRIPTS.rar)
Just do a search for 'camera', and you'll run into the section dealing with how to adjust camera parameters, and how to implement most kinds of camera dynamics.
-
Thanks Mad.
-
DP BUMP
I was finishing off Stag's ROBONOVA 2 arena. All I did here was add a different elasticity to the already functioning arena. Now the whole thing is completely white ingame. Here's the decompiled gtm: http://pastebin.org/130586
-
DP BUMP
I was finishing off Stag's ROBONOVA 2 arena. All I did here was add a different elasticity to the already functioning arena. Now the whole thing is completely white ingame. Here's the decompiled gtm: http://pastebin.org/130586 (http://pastebin.org/130586)
did you not change the names of the BMP images at all ? normally that's the case when it cannot locate its map files
Edit: also that gmf you posted isnt complete
-
Stag told me they were fine before I made tis elasticity change.
What do you mean by not complete?
-
it cuts off part way through one of the objects...no Rigidbody section and perhaps a few objects also missing
-
I'll upload the whole thing then.
EDIT: https://gametechmods.com/uploads/files/gg.zip (https://gametechmods.com/uploads/files/gg.zip)
-
is it just the DSL Tourney arena ?
also you might note you have the hole arena collision bouncy not just walls
-
Basically, yes it is the DSL Tourney arena.
do you know how I can fix that?
-
you need to find the walls object and create a rigid-body for it in order to separate it
I remember doing it for the parking lot arena, separating the chain link fencing.. its not as daunting as it sounds ;)
-
It sounds scary. Stag's ok with the floor being bouncy anyway.
Do you know why the whole arena went white?
-
have you named all the BMP images the same as they are in the GMF ?
-
Yes. Could there be any other reason?
-
who skinned it ? did they modify the sizes of the images at all ? that is known to cause crazy things sometimes
-
Stag skinned it. I modified the image recently though. I flipped it horizonatlly, and that is all. But I did rotate it 90 degrees by mistake....
-
just try using the original skin (renaming the bmp images) and see if that works
-
Will do.
EDIT: It is still white.
-
GK, if you compress the arena folder and its py, and then send it to me, I'll get to it tonight or tomorrow, NP....(or Joe, Serge, Trov, ACAMS, etc.)
-
Will do.
BTW, I have now got Yahoo IM, which you enquired about a while back.
-
DP
Would the fact that I think I put the elasticity value in with a space instead of a tab have caused the problems?
-
it still seems like a material related issue but you can try fixing your indentations
-
Ok.
-
DP:
The compilation went smoother but that wasn't the answer.
Also, Joe, how high was the elasticity of the boxing arena?
-
erm.. good question lol I will have to check up on that one
-
Didn't forget you GK. Just working a lot.
I'll get back.
-
Thanks Mad. I'd just remembered I'd got it wrong with the indentation anyway.
-
Also, Joe, how high was the elasticity of the boxing arena?
30 for each wall (they are all separate objects)
-
Ok. 3 isn't enough then. :D
-
LOL nope I may had lead you astray saying something like no more then 5 before ? I was thinkignof another Rigidbody mod I did on another project, sorry