# Set Path Display Source Unit

Grammar — Set pathDisplay source Unit
FlagsNative | Action

# Arguments

  • int<path> — Path Display
  • unit — Source

Returns — void

native void PathSetSourceUnit(int inPathId, unit inUnit);

Category: UI / Path Display

# Examples

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmap/MapScript.galaxy:3441


        if ((UnitIsAlive(gv_heroPlayer) == true)) {
            PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            PathSetVisible(PathLastCreated(), c_pathLocationAll, true);
        }

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmap/MapScript.galaxy:3800


        if ((UnitIsAlive(gv_heroPlayer) == true)) {
            PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            PathSetVisible(PathLastCreated(), c_pathLocationAll, true);
        }

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmap/MapScript.galaxy:4196

            else {
                PathSetDestinationPoint(PathLastCreated(), UnitGroupCenterOfGroup(gv_siegeGiantsMercs));
                PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            }
        }

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmap/MapScript.galaxy:1765


        if ((UnitIsAlive(gv_heroPlayer) == true)) {
            PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            PathSetVisible(PathLastCreated(), c_pathLocationAll, true);
        }

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmap/MapScript.galaxy:2580

            else {
                PathSetDestinationPoint(PathLastCreated(), libMapM_gv_mMRavenTributeSpawnPoints[gv_mapMechanicIndex]);
                PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            }
        }

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmapMapScript.galaxy:3441


        if ((UnitIsAlive(gv_heroPlayer) == true)) {
            PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            PathSetVisible(PathLastCreated(), c_pathLocationAll, true);
        }

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmapMapScript.galaxy:3800


        if ((UnitIsAlive(gv_heroPlayer) == true)) {
            PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            PathSetVisible(PathLastCreated(), c_pathLocationAll, true);
        }

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmapMapScript.galaxy:4196

            else {
                PathSetDestinationPoint(PathLastCreated(), UnitGroupCenterOfGroup(gv_siegeGiantsMercs));
                PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            }
        }

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmapMapScript.galaxy:1765


        if ((UnitIsAlive(gv_heroPlayer) == true)) {
            PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            PathSetVisible(PathLastCreated(), c_pathLocationAll, true);
        }

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmapMapScript.galaxy:2580

            else {
                PathSetDestinationPoint(PathLastCreated(), libMapM_gv_mMRavenTributeSpawnPoints[gv_mapMechanicIndex]);
                PathSetSourceUnit(PathLastCreated(), gv_heroPlayer);
            }
        }

mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmodbase.stormdata/LibMDoE.galaxy:3312

    UnitSetState(lv_hero, c_unitStateStoppable, true);
    libNtve_gf_SendActorMessageToUnit(lv_hero, "Signal RestoreModel");
    PathSetSourceUnit(libGame_gv_players[lv_player].lv_pathDisplay, lv_hero);
    return true;
}

mods/heroesmapmods/battlegroundmapmods/battlefieldofeternity.stormmodbase.stormdata/LibMLBD.galaxy:1150

                PathClearWayPoints(libMLBD_gv_mMBOELaningPathLine);
            }
            PathSetSourceUnit(libMLBD_gv_mMBOELaningPathLine, lv_flyPathingLineUnit);
            PathSetDestinationPoint(libMLBD_gv_mMBOELaningPathLine, libMLBD_gv_mMBOELaningRallyPoint);
            if ((DistanceBetweenPoints(UnitGetPosition(libMLBD_gv_mMBOEBossesLaning), libMLBD_gv_mMBOELaningRallyPoint) <= 0.5)) {

mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmodbase.stormdata/LibMHtM.galaxy:1752

    UnitSetState(lv_heroUnit, c_unitStateTargetable, true);
    libNtve_gf_SendActorMessageToUnit(lv_heroUnit, "Signal RestoreModel");
    PathSetSourceUnit(libGame_gv_players[lv_owningPlayer].lv_pathDisplay, lv_heroUnit);
    libGame_gf_SendEventCheckUnitForAbilityRedirect(lv_heroUnit, lv_heroUnit, true, lv_heroPreTeleportPosition);
    return true;

mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmodbase.stormdata/LibMHtM.galaxy:1815

    UnitSetState(lv_heroUnit, c_unitStateTargetable, true);
    libNtve_gf_SendActorMessageToUnit(lv_heroUnit, "Signal RestoreModel");
    PathSetSourceUnit(libGame_gv_players[lv_owningPlayer].lv_pathDisplay, lv_heroUnit);
    libGame_gf_SendEventCheckUnitForAbilityRedirect(lv_heroUnit, lv_heroUnit, true, lv_heroPreTeleportPosition);
    return true;

mods/heroesmapmods/battlegroundmapmods/towersofdoom.stormmodbase.stormdata/LibMTOD.galaxy:3184

    UnitIssueOrder(lv_hero, Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
    libNtve_gf_SendActorMessageToUnit(lv_hero, "Signal RestoreModel");
    PathSetSourceUnit(libGame_gv_players[lv_player].lv_pathDisplay, lv_hero);
    return true;
}