sm.unit.getUnitsInRange

Returns a table with units within a given range.

Kind: Function

Environments: Game

Game

sm.unit.getUnitsInRange( world, position, range, heightModifier )

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
world World The world to check in.
position Vec3 The position to check from.
range number The range to check.
heightModifier (optional) number A value to modify the height of the range check. Defaults to 1. Higher values makes enemy elevation difference deemed as greater distance.