You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for(Unit unit: game.enemy().getUnits()){
x = unit.getPosition().getX();
y = unit.getPosition().getY();
}
When the enemy unit is visible, I get reasonable values for x and y such as (1280, 1104) on a 128x128 map which is 4096x4096 pixels. However, when the enemy unit goes back into the fog of war, the values I receive for x and a y are 32000, 32064. The unit type is unknown and the hit points are zero, however the ID stays the same. Is this the expected behavior? Shouldn't the game only return an enemy unit if the enemy unit if the it is visible to the player?
The text was updated successfully, but these errors were encountered:
I have a loop which is the following:
When the enemy unit is visible, I get reasonable values for x and y such as (1280, 1104) on a 128x128 map which is 4096x4096 pixels. However, when the enemy unit goes back into the fog of war, the values I receive for x and a y are 32000, 32064. The unit type is unknown and the hit points are zero, however the ID stays the same. Is this the expected behavior? Shouldn't the game only return an enemy unit if the enemy unit if the it is visible to the player?
The text was updated successfully, but these errors were encountered: