Kappa-131st Posted August 17, 2022 Share Posted August 17, 2022 In the mission editor, we can see yellow and red circles indicating respectively the maximum detection range and the maximum firing range. There is also a minimum range for some models. It would be interesting to create lua functions to return its information, as well as a function indicating if a point or a unit are "within range" of fire. This can be used in particular for artillery script, or dca... Function we needed : - unit:getMinRange() return minimum range of unit in metter - unit:getMaxRange() return maximum range of unit in metter (red circle) - unit:getDetectionRange() return maximum detection Range in metter (yellow circle) - unit:pointInRange(vec3) param point (vec3) of a position. Return boolean (true/false) if a param "point" is between min and max range. Link to comment Share on other sites More sharing options...
Recommended Posts