Not quite sure what you mean exactly with the buffer_index thing, i assume you are refering to the number directly after accum in the script commands.
Every entity has 8 “buffers”, just think of them as little boxes, into which you can store numbers, check against the value of the box, or set individual parts of the box (bitset).
These boxes are 32 bit integers.
Now for a short lesson in binary arithmatic.
The binary system has only two numbers, 0 and 1, i.e. it’s base 2, with decimal being base 10.
Decimal (as i’m sure you are aware ) counts like so:
0…1…2…3…4…5…6…7…8…9…10…11…12 etc…
whereas binary goes like this:
0…1…10…11…100…101…110…111…1000 etc…
Therefore 0 = 0, 1 = 1, 2 = 10, 3 = 11
For every new column you add in decimal, you are multiplying by 10 how much this column is worth, in binary it is 2. So, for a 32 bit integer we have 32 columns (in binary).
bitset, allows you to set the value of column X to 1, and bitreset allows you to set it to 0, this allows you to store 32 different on or off states, so if all you need to know about parts something is whether they are on/off, dead/alive, etc… then you can use bitset, and bitreset + the various check functions to your advantage, rather than using a single accum buffer for each one.
Half the stuff i’ve mentioned here is either:
a) not relevant really
b) something you already knew
c) something i haven’t explained all that well
Any more questions, feel free to ask, i’m quite happy to ramble on about complete nonsense…