# Set Player Mount

Grammar — Set Player player’s mount to mount|Mount.
FlagsNative | Action

Sets the mount of the specified player.

# Arguments

  • int — Player
  • string<gamelink::Mount> — Mount

Returns — void

native void PlayerSetMount(int inPlayer, string inMount);

Category: Player / Player Settings

# Examples

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/%2810%29trymemode.stormmap/MapScript.galaxy:1443

    libGame_gf_MinionTurnOnOffCatapults(false);
    PlayerSetHero(gv_pLAYER_AI_Enemy_C, "Arthas");
    PlayerSetMount(gv_pLAYER_AI_Enemy_C, "HorseBlack");
    libGame_gv_players[gv_pLAYER_AI_Enemy_C].lv_selectedMount = libCore_gf_DataMountGetMountIndexFromMountLink("HorseBlack");
    TriggerExecute(gt_MercCampSpawnTimerOverride, true, false);

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/(10)trymemode.stormmapmap/MapScript.galaxy:1443

    libGame_gf_MinionTurnOnOffCatapults(false);
    PlayerSetHero(gv_pLAYER_AI_Enemy_C, "Arthas");
    PlayerSetMount(gv_pLAYER_AI_Enemy_C, "HorseBlack");
    libGame_gv_players[gv_pLAYER_AI_Enemy_C].lv_selectedMount = libCore_gf_DataMountGetMountIndexFromMountLink("HorseBlack");
    TriggerExecute(gt_MercCampSpawnTimerOverride, true, false);

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:327

    else {
    }
    PlayerSetMount(lp_player, "LunarFestivalRocket");
}

mods/heroesbrawlmods/heroselectionmods/ingameheroselection.stormmodbase.stormdata/LibIGHS.galaxy:774

    }
    if ((lv_possibleMountCount > 0)) {
        PlayerSetMount(lp_player, lv_possibleMounts[RandomInt(1, lv_possibleMountCount)]);
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:5594

    }
    libGame_gv_players[lv_choPlayerID].lv_selectedMount = libCore_gf_DataMountGetMountIndexFromMountLink(lv_selectedMountLink);
    PlayerSetMount(lv_choPlayerID, libGame_gv_players[lv_choPlayerID].lv_mountData.lv_mountID);
    libCore_gf_DataLootContentLoadBannerDataIntoIndex(PlayerBanner(lp_mountSelectedPlayer), lv_choPlayerID);
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:7663

        lv_mountConfigIndex = libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_mountLink);
        libCore_gf_DataMountsLoadMountDataIntoIndex(lv_mountLink, libCore_gf_DataMountGetMountModelScaleAtConfigIndex(lv_mountConfigIndex), libCore_gf_DataMountGetMountWalkAnimSpeedAtConfigIndex(lv_mountConfigIndex), libCore_gf_DataMountGetMountPoseAnimGroupAtConfigIndex(lv_mountConfigIndex), lv_itPlayer);
        PlayerSetMount(lv_itPlayer, libGame_gv_players[lv_itPlayer].lv_mountData.lv_mountID);
    }
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:7900

    lv_chosenMountConfigIndex = libCore_gf_DataMountGetMountConfigIndexFromMountLink(lv_chosenMountLink);
    libCore_gf_DataMountsLoadMountDataIntoIndex(lv_chosenMountLink, libCore_gf_DataMountGetMountModelScaleAtConfigIndex(lv_chosenMountConfigIndex), libCore_gf_DataMountGetMountWalkAnimSpeedAtConfigIndex(lv_chosenMountConfigIndex), libCore_gf_DataMountGetMountPoseAnimGroupAtConfigIndex(lv_chosenMountConfigIndex), lp_choosingPlayer);
    PlayerSetMount(lp_choosingPlayer, libGame_gv_players[lp_choosingPlayer].lv_mountData.lv_mountID);
}