Check if Enemy Units in Visible Range

civ editor11

Ruler
Joined
Jan 24, 2009
Messages
999
Location
U.S.
Is there a function in the SDK to check if an enemy unit is in visible range of another? If not how can I get an array/vector of all the tiles in visible range of a unit
 
What do you mean by 'in visible range of a unit'. Visibility is generally done on a player level rather than a unit level.

What is it that you are trying to accomplish?
 
I'm trying to write an automation for a unit that has it search around and when it sees another unit in its visibility range it avoids it. This is to simulate a loss of communication with the leadership. I was also planning on adding something so that when a friendly unit comes in visible range their ranges combine
 
Top Bottom