Author Topic: Arena modding question (again)  (Read 1306 times)

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17527
  • Rep: 3
  • Awards BOTM Winner
    • View Profile
    • Awards
Arena modding question (again)
« 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.

Offline JoeBlo

Re: Arena modding question (again)
« Reply #1 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.


Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17527
  • Rep: 3
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Arena modding question (again)
« Reply #2 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?

Offline Madiaba

Re: Arena modding question (again)
« Reply #3 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.)
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...