# Is Point In Shrub
Grammar — Is point point in a Shrub
Flags —Native
|Function
Returns whether a point is in a shrub.
# Arguments
point
— Point
Returns — bool
native bool InShrub(point inPos);
# Related
Category: AI Advanced / Utility / Functions
- Is Point In Shrub —
bool
— InShrub - Is Campaign AI —
bool
— AIIsCampaign - Grab Unit —
unit
— AIGrabUnit - Get State —
int
— AIState - Get Flag —
bool
— AIGetFlag - Get Coop Flag —
bool
— AIGetCoopFlag - Unit Has AI Option —
bool
— UnitGetAIOption - Wants To Surrender —
bool
— AIGivingUp - AI Pathing Cost Map —
int
— AIPathingCostMap - AI Pathing Cost Unit —
int
— AIPathingCostUnit - AI Self Reinforce Point —
point
— AISelfReinforceDropPoint
# Examples
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:3180
for ( ; ( (auto02EA91E5_ai >= 0 && lv_itNearbyShrubChecks <= auto02EA91E5_ae) || (auto02EA91E5_ai < 0 && lv_itNearbyShrubChecks >= auto02EA91E5_ae) ) ; lv_itNearbyShrubChecks += auto02EA91E5_ai ) {
lv_positionToCheck = PointWithOffsetPolar(UnitGetPosition(lv_rexxar), 1.5, (45 * lv_itNearbyShrubChecks));
if ((InShrub(lv_positionToCheck) == true) && ((lv_positionToMove == null) || (DistanceBetweenPoints(UnitGetPosition(lv_misha), lv_positionToMove) > DistanceBetweenPoints(lv_positionToCheck, UnitGetPosition(lv_misha))))) {
lv_positionToMove = lv_positionToCheck;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:3262
for ( ; ( (auto817393C0_ai >= 0 && lv_itNearbyShrubChecks <= auto817393C0_ae) || (auto817393C0_ai < 0 && lv_itNearbyShrubChecks >= auto817393C0_ae) ) ; lv_itNearbyShrubChecks += auto817393C0_ai ) {
lv_positionToCheck = PointWithOffsetPolar(UnitGetPosition(lv_rexxar), 1.5, (45 * lv_itNearbyShrubChecks));
if ((InShrub(lv_positionToCheck) == true) && ((lv_positionToMove == null) || (DistanceBetweenPoints(UnitGetPosition(lv_misha), lv_positionToMove) > DistanceBetweenPoints(lv_positionToCheck, UnitGetPosition(lv_misha))))) {
lv_positionToMove = lv_positionToCheck;
}