flaing / jnibwapi

Automatically exported from code.google.com/p/jnibwapi
0 stars 0 forks source link

Move command. #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I ve got a problem with move command i ve tried to move a scv tile to build a 
barrack. However when i give the command move the tile goes to a wrong position 
instead of the position I command it. Have anyone idea about this?

bwapi.move(unit.getID(), TerranCommanderX+10, TerranCommanderX+10);
where unit.getID()->is the tile's id, and TerranCommanderX,TerranCommanderY 
terrans_commander position.
Instead of going near the building the tile its going to a wrong place in the 
map.

Thanks in advance!!

Original issue reported on code.google.com by snake__p...@hotmail.com on 22 Oct 2011 at 3:51

GoogleCodeExporter commented 9 years ago
As far as I can tell from what you have said, it appears you're trying to move 
the SCV to a tile position. BWAPI's move command accepts positions (which are 
different from tile positions). The mapping between a position and a tile 
position is:

position = tileposition * 32

As I don't believe this is a defect I'm closing this issue, but if you continue 
to have problems I'll consider reopening it.

Original comment by Fobbah on 24 Oct 2011 at 12:29

GoogleCodeExporter commented 9 years ago
Thaks man it works fine. Such issues, can be found in Bwapi documentation??

Original comment by snake__p...@hotmail.com on 24 Oct 2011 at 5:54