
The second question is simple: has someone developed any function in order to know if a particular radar has detected an enemy unit, or if a air unit has any enemy unit within its range? Or any ideas on how to implement this?
Thank you!
Moderator: Defcon moderators
Ace Rimmer wrote:I can't remember the difference betweeen sourceID and targetID, but you can look here for more information if you haven't already:
http://www.corsix.org/defcon_luabot/doc ... fn-OnEvent
Code: Select all
if GetDistance(unit:GetLongitude(), unit:GetLatitude(), radar:GetLongitude(), radar:GetLatitude()) < unit:GetRange()
Users browsing this forum: No registered users and 0 guests