61
DNA - General / shootval and distance for -1 shots
« on: April 02, 2010, 06:06:19 AM »
I'm trying to figure out a formula for shootval so that the bullets are shot with the right distance.
But on the wiki sysvars i dont read how it behaves.
Here on the forums i read some words about log2(distance) ??
However log2 is not an operator in DarwinBots , what might come close to it is bit operation >>
So far i failed to write a good formula and searched the forums and wiki, and the beastairy.
Has someone already solved it. ??
How to perfectly shoot at something with the right distance.
Also i think .mass impacts a shot distance ??, but 'm not sure but bot size and shotlength dont seam to compare
I can figure out how to get the distance and angle with :
*.refxpos *.refypos dist .edist store
*.refxpos *.refypos angle .setaim store
-1 .shoot store
But now how to shoot exactly to it ? (or with a margin : *.edist 10 add .edist store)
But on the wiki sysvars i dont read how it behaves.
Here on the forums i read some words about log2(distance) ??
However log2 is not an operator in DarwinBots , what might come close to it is bit operation >>
So far i failed to write a good formula and searched the forums and wiki, and the beastairy.
Has someone already solved it. ??
How to perfectly shoot at something with the right distance.
Also i think .mass impacts a shot distance ??, but 'm not sure but bot size and shotlength dont seam to compare
I can figure out how to get the distance and angle with :
*.refxpos *.refypos dist .edist store
*.refxpos *.refypos angle .setaim store
-1 .shoot store
But now how to shoot exactly to it ? (or with a margin : *.edist 10 add .edist store)