sm.ai.getBreachablePosition

Check if there's an attackable object between the unit and a position.

Kind: Function

Environments: Game

Game

sm.ai.getBreachablePosition( unit, position, range, attack )

Open the full Game reference

Parameters:

Name Type Description
unit Unit The unit.
position Vec3 The target position.
range number The distance.
attack integer The possible attack level from the breacher.

Returns:

Type Description
boolean
Vec3
Shape
Returns true if a breachable object is found, an attackable position, and an attackable shape.
boolean
Vec3
Harvestable
Returns true if a breachable object is found, an attackable position, and an attackable harvestable.
boolean
Vec3
Lift
Returns true if a breachable object is found, an attackable position, and an attackable lift.
boolean
Vec3
Returns false if the object is unbreachable and an attackable position.
boolean Returns true when nothing is found.