gametechmods
Robot Arena => Modifications => Topic started 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.
-
I would say its doable, I dont have all the stuff in front of me right now but
def ZoneEvent(self, direction, id, robot, chassis):
would be the section to add the code to
and then try
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.
-
Now when the ball is knocked in the goal a runtime error pops up. Do I need commas, spaces or anything?
-
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.)