gametechmods

Robot Arena => General Support => Topic started by: Resetti's Replicas on March 20, 2009, 12:41:10 PM

Title: 'Weapon' numbers in bindings
Post by: Resetti's Replicas on March 20, 2009, 12:41:10 PM
Something I've noticed in the bindings is each robot has a command called "weapons" and then a bunch of numbers, like this:

'weapons': (1,2,3,4,5,6,7,8,9)}))

What do these numbers do?  I know that a bot can't use a weapon unless there is a number, but what effect would it have on a robot if I changed one of the numbers?
Title: 'Weapon' numbers in bindings
Post by: philetbabe on March 20, 2009, 01:21:50 PM
Quote from: Sonny_Resetti;31394
Something I've noticed in the bindings is each robot has a command called "weapons" and then a bunch of numbers, like this:

'weapons': (1,2,3,4,5,6,7,8,9)}))

What do these numbers do?  I know that a bot can't use a weapon unless there is a number, but what effect would it have on a robot if I changed one of the numbers?


such a common question ....
answer here :
Quote from: philetbabe;23541
So, what are these numbers in the weapons list contained in binding.py  ?
Code: [Select]
...,'weapons':(1,2,3,4,5,6,7,8,9)}))
Title: 'Weapon' numbers in bindings
Post by: somestrangeguy on March 20, 2009, 03:48:31 PM
They are components by their numbers, in order of attaching. This is how the Omni AI detects weapon loss an switces to push mode when all weapons are off, but if you have #1 there, it will never do that, because the first component you attach is on the baseplate.
There is a program(someone link it, im too lazy) that will let you to see the structre of your robot in text form, allowing you to type in the exact numbers in the weapons section.