gametechmods

Robot Arena => Modifications => Topic started by: Badnik96 on April 20, 2010, 07:24:34 PM

Title: Arena modding question (again)
Post by: Badnik96 on April 20, 2010, 07:24:34 PM
I am working on a mod to the Soccer Arena, but I need to know how to edit the .py so that when the ball is knocked into a goal, the other robot is KO'ed. I would like help.
Title: Re: Arena modding question (again)
Post by: JoeBlo on April 20, 2010, 11:33:50 PM
I would say its doable, I dont have all the stuff in front of me right now but

Code: [Select]
def ZoneEvent(self, direction, id, robot, chassis):
would be the section to add the code to

and then try

Code: [Select]
plus.eliminatePlayer(0)
in the brackets

0 for bot 1
1 for bot 2
2 for bot 3
3 for bot 4

since you have two bits of code for each robots scoring conditions just add the elimination of each player

you will have to try it out though im not to sure if that will work.

Title: Re: Arena modding question (again)
Post by: Badnik96 on April 21, 2010, 05:10:30 PM
Now when the ball is knocked in the goal a runtime error pops up. Do I need commas, spaces or anything?
Title: Re: Arena modding question (again)
Post by: Madiaba on April 22, 2010, 07:05:20 AM
Badnick,
Joe and I are working on your request.  Then you can see how to do it.
Give a few days to tweek things.  (It'll be at least a bit more fancy than your request.)