# Is Point In Shrub

Grammar — Is point point in a Shrub
FlagsNative | Function

Returns whether a point is in a shrub.

# Arguments

  • point — Point

Returns — bool

native bool InShrub(point inPos);

Category: AI Advanced / Utility / Functions

# Examples

mods/heroesdata.stormmodbase.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.stormmodbase.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;
                    }