# Override Player Option
Grammar — Override option option for player p to value
Flags —Native
|Action
Setting the value to “No Value” will clear the override and return the value to whatever the player had selected previously. If an override value is set, option UI will be disabled for the player. Overrides are removed when leaving a game.
# Arguments
int
— Playerstring
<gameoption> — Optionstring
<gameoptionvalue> — Value
Returns — void
native void PlayerOptionOverride(
int p,
string option,
string value,
);
# Related
Category: Player / Player Settings
- Modify Player Property (Integer) —
void
— PlayerModifyPropertyInt - Modify Player Property (Real) —
void
— PlayerModifyPropertyFixed - Player Property (Integer) —
int
— PlayerGetPropertyInt - Player Property (Real) —
fixed
— PlayerGetPropertyFixed - Modify Player Score (Integer) —
void
— PlayerScoreValueSetFromInt - Modify Player Score (Real) —
void
— PlayerScoreValueSetFromFixed - Player Score Value (Integer) —
int
— PlayerScoreValueGetAsInt - Player Score Value (Real) —
fixed
— PlayerScoreValueGetAsFixed - Turn Player Flag On/Off —
void
— PlayerSetState - Player Flag Check —
bool
— PlayerGetState - Player License Check —
bool
— PlayerHasLicense - Player Access Check —
bool
— PlayerHasAccessTo - Player Has Reward —
bool
— PlayerHasReward - Player Has Talent —
bool
— PlayerHasTalent - Name Of Player —
text
— PlayerName - Handle Of Player —
string
— PlayerHandle - Race Of Player —
string
<gamelink::Race> — PlayerRace - Hero Of Player —
string
<gamelink::Hero> — PlayerHero - Skin Of Player —
string
<gamelink::Skin> — PlayerSkin - Mount Of Player —
string
<gamelink::Mount> — PlayerMount - Spray Of Player —
string
<gamelink::Spray> — PlayerSpray - Artifact Of Player —
string
<gamelink::Artifact> — PlayerArtifact - Artifact Rank Of Player —
int
— PlayerArtifactRank - Commander Of Player —
string
<gamelink::Commander> — PlayerCommander - Commander Level Of Player —
int
— PlayerCommanderLevel - Commander Mastery Level Of Player —
int
— PlayerCommanderMasteryLevel - Commander Mastery Talent Rank Of Player —
int
— PlayerCommanderMasteryTalentRank - Commander Selected Prestige Of Player —
int
— PlayerCommanderSelectedPrestige - Brutal Plus Difficulty of Player —
int
— PlayerBrutalPlusDifficulty - Retry Mutation Index of Player —
int
— PlayerRetryMutation - Allied Commander Enemy Wave Type —
int
— PlayerACEnemyWaveType - Start Location Of Player —
point
— PlayerStartLocation - Controller Of Player —
int
<preset::PlayerController> — PlayerType - Status Of Player —
int
<preset::PlayerStatus> — PlayerStatus - Set Player Color —
void
— PlayerSetColorIndex - Set Player Race —
void
— PlayerSetRace - Set Player Hero —
void
— PlayerSetHero - Set Player Skin —
void
— PlayerSetSkin - Set Player Console Skin —
void
— PlayerSetConsoleSkin - Apply Player Skin —
void
— PlayerApplySkin - Apply Player Skin (Replacing Existing Unit) —
void
— libNtve_gf_PlayerApplySkinReplacingExistingUnit - Set Player Mount —
void
— PlayerSetMount - Set Player Spray —
void
— PlayerSetSpray - Set Player Commander —
void
— PlayerSetCommander - Set Player Commander Level —
void
— PlayerSetCommanderLevel - Set Player Commander Mastery Level —
void
— PlayerSetCommanderMasteryLevel - Set Player Death Timer —
void
— PlayerSetDeathTimer - Set Player Bounds —
void
— PlayerSetBounds - Add Player Talent —
void
— PlayerAddTalent - Remove Player Talent —
void
— PlayerRemoveTalent - Add Player Response —
void
— PlayerAddResponse - Remove Player Response —
void
— PlayerRemoveResponse - Clear Player Response —
void
— PlayerClearResponse - Player Color —
int
<playercolor> — PlayerGetColorIndex - Override Player Option —
void
— PlayerOptionOverride - Player Hotkey Profile —
string
— PlayerGetHotkeyProfile - Player Property Changed —
void
— TriggerAddEventPlayerPropChange - Player Joins Game —
void
— TriggerAddEventPlayerJoin - Player Leaves Game —
void
— TriggerAddEventPlayerLeft - Triggering Player —
int
— EventPlayer - Triggering Player Property —
int
<preset::Player_Property_Get> — EventPlayerProperty - Triggering Player Property Change (Integer) —
int
— EventPlayerPropertyChangeInt - Triggering Player Property Change (Real) —
fixed
— EventPlayerPropertyChangeFixed - Player Add Label —
void
— PlayerAddLabel - Player Remove Label —
void
— PlayerRemoveLabel - Player Remove All Labels —
void
— PlayerRemoveAllLabels - Player Has Label —
bool
— PlayerHasLabel - Player Add Reward —
void
— PlayerAddReward
# Examples
mods/heroes.stormmod — base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmap/MapScript.galaxy:5746
if ((libNtve_gf_PlayerInCinematicMode(gv_pLAYER_01_USER) == false)) {
PlayerOptionOverride(gv_pLAYER_01_USER, "camerafollow", "1");
}
mods/heroes.stormmod — base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmap/MapScript.galaxy:3444
if ((libNtve_gf_PlayerInCinematicMode(gv_pLAYER_01_USER) == false)) {
PlayerOptionOverride(gv_pLAYER_01_USER, "camerafollow", "1");
}
mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmap — MapScript.galaxy:5746
if ((libNtve_gf_PlayerInCinematicMode(gv_pLAYER_01_USER) == false)) {
PlayerOptionOverride(gv_pLAYER_01_USER, "camerafollow", "1");
}
mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmap — MapScript.galaxy:3444
if ((libNtve_gf_PlayerInCinematicMode(gv_pLAYER_01_USER) == false)) {
PlayerOptionOverride(gv_pLAYER_01_USER, "camerafollow", "1");
}
mods/heroesbrawlmods/arenamodemods/arenamode.stormmod — base.stormdata/LibAREN.galaxy:753
if (auto434C0DDD_var<0) { break; }
CameraLockInput(auto434C0DDD_var, true);
PlayerOptionOverride(auto434C0DDD_var, "camerafollow", "0");
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(false, auto434C0DDD_var);
}
mods/heroesbrawlmods/arenamodemods/attackdefend.stormmod — base.stormdata/LibAtDe.galaxy:149
if (auto4F75C67D_var<0) { break; }
CameraLockInput(auto4F75C67D_var, true);
PlayerOptionOverride(auto4F75C67D_var, "camerafollow", "0");
}
Wait(0.0625, c_timeGame);
mods/heroesbrawlmods/arenamodemods/trialgrounds.stormmod — base.stormdata/LibAMVS.galaxy:339
if (autoC3DC2A01_var<0) { break; }
CameraLockInput(autoC3DC2A01_var, true);
PlayerOptionOverride(autoC3DC2A01_var, "camerafollow", "0");
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(false, autoC3DC2A01_var);
}
mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod — base.stormdata/LibMDoE.galaxy:217
if (auto409BA195_var<0) { break; }
CameraLockInput(auto409BA195_var, true);
PlayerOptionOverride(auto409BA195_var, "camerafollow", "0");
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(false, auto409BA195_var);
}
mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod — base.stormdata/LibMDoE.galaxy:2360
if (autoE2F8DB5E_var<0) { break; }
CameraLockInput(autoE2F8DB5E_var, true);
PlayerOptionOverride(autoE2F8DB5E_var, "camerafollow", "0");
}
Wait(0.0625, c_timeGame);
mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod — base.stormdata/LibPEB1.galaxy:9769
if (auto8E542D67_var<0) { break; }
CameraLockInput(auto8E542D67_var, true);
PlayerOptionOverride(auto8E542D67_var, "camerafollow", "0");
CameraApplyInfo(auto8E542D67_var, CameraInfoDefault(), 2.0, -1, 10.0, false);
CameraPan(auto8E542D67_var, PointFromName("Victory Pan"), 2.0, -1, 10.0, false);
mods/heroesbrawlmods/brawlmapmods/coop/escapefrombraxis.stormmod — base.stormdata/LibPEB1.galaxy:9872
if (auto35A7B0B1_var<0) { break; }
VisRevealArea(auto35A7B0B1_var, RegionPlayableMap(), 0.0, false);
PlayerOptionOverride(auto35A7B0B1_var, "camerafollow", "0");
CameraForceFollowUnitGroup(auto35A7B0B1_var, false);
CameraApplyInfo(auto35A7B0B1_var, CameraInfoDefault(), 2.0, -1, 10.0, false);
mods/heroesbrawlmods/brawlmapmods/coop/escapefrombraxis.stormmod — base.stormdata/LibPEB1.galaxy:10034
UnitIssueOrder(lv_heroUnit, OrderTargetingPoint(AbilityCommand("move", 0), PointWithOffsetPolar(PointFromName(("Shelter - Player Spawn " + IntToString(libGame_gv_players[lv_playerIndex].lv_rosterSlot))), 14.0, 45.0)), c_orderQueueReplace);
UnitIssueOrder(lv_heroUnit, Order(AbilityCommand("move", 2)), c_orderQueueAddToEnd);
PlayerOptionOverride(lv_playerIndex, "camerafollow", "0");
CameraForceFollowUnitGroup(lv_playerIndex, false);
CameraApplyInfo(lv_playerIndex, CameraInfoDefault(), 0.0, -1, 10.0, false);
mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod — base.stormdata/LibPVEB.galaxy:1268
if (lv_itPlayer<0) { break; }
CameraLockInput(lv_itPlayer, true);
PlayerOptionOverride(lv_itPlayer, "camerafollow", "0");
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(false, lv_itPlayer);
}
mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod — base.stormdata/LibPVEM.galaxy:1385
if (lv_itPlayer<0) { break; }
CameraLockInput(lv_itPlayer, true);
PlayerOptionOverride(lv_itPlayer, "camerafollow", "0");
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(false, lv_itPlayer);
}
mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod — base.stormdata/LibLNYF.galaxy:809
CameraUseHeightDisplacement(lv_i, true);
CameraFollowUnitGroup(lv_i, libNtve_gf_ConvertUnitToUnitGroup(UnitLastCreated()), true, false);
PlayerOptionOverride(lv_i, "camerafollow", "1");
libGame_gv_players[lv_i].lv_disableMount = false;
}
mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod — base.stormdata/LibLNYF.galaxy:825
CameraUseHeightDisplacement(libCore_gv_oBSERVER_ObserverUIPlayer, true);
CameraFollowUnitGroup(libCore_gv_oBSERVER_ObserverUIPlayer, libNtve_gf_ConvertUnitToUnitGroup(UnitLastCreated()), true, false);
PlayerOptionOverride(libCore_gv_oBSERVER_ObserverUIPlayer, "camerafollow", "1");
return true;
}
mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod — base.stormdata/LibLNYF.galaxy:1150
CameraUseHeightDisplacement(libCore_gv_oBSERVER_ObserverUIPlayer, true);
CameraFollowUnitGroup(libCore_gv_oBSERVER_ObserverUIPlayer, libGame_gv_players[1].lv_cameraCurrentTargetGroup, true, false);
PlayerOptionOverride(libCore_gv_oBSERVER_ObserverUIPlayer, "camerafollow", "1");
if ((libLNYF_gv_observer_InvisibleUnit != null)) {
UnitSelect(libLNYF_gv_observer_InvisibleUnit, libCore_gv_oBSERVER_ObserverUIPlayer, false);
mods/heroesbrawlmods/brawlmapmods/pullparty.stormmod — base.stormdata/LibMMPP.galaxy:66
if (auto2557329E_var<0) { break; }
CameraLockInput(auto2557329E_var, true);
PlayerOptionOverride(auto2557329E_var, "camerafollow", "0");
}
Wait(0.0625, c_timeGame);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1072
}
else {
PlayerOptionOverride(lp_player, "camerafollow", null);
}
if ((libGame_gv_players[lp_player].lv_cameraForcedLock == true) && (libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn != null)) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1079
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
if (((lp_player != 1) || (libCore_gv_sYSGameMode != libCore_ge_GameModes_Tutorial1Deprecated))) {
PlayerOptionOverride(lp_player, "camerafollow", "1");
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1089
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
PlayerOptionOverride(lp_player, "camerafollow", "1");
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1097
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
PlayerOptionOverride(lp_player, "camerafollow", "1");
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1102
if ((libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn == null)) {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = null;
PlayerOptionOverride(lp_player, "camerafollow", "0");
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:19106
if (autoE67D1356_var<0) { break; }
CameraLockInput(autoE67D1356_var, true);
PlayerOptionOverride(autoE67D1356_var, "camerafollow", "0");
libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(false, autoE67D1356_var);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:526
if ((lp_lockUnlock == false)) {
libStEx_gv_sETutorialCameraLocked = false;
PlayerOptionOverride(1, "camerafollow", "0");
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:530
else {
libStEx_gv_sETutorialCameraLocked = true;
PlayerOptionOverride(1, "camerafollow", "1");
}
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:538
// Implementation
if ((libStEx_gv_sETutorialCameraLocked == true)) {
PlayerOptionOverride(1, "camerafollow", "1");
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:541
}
else {
PlayerOptionOverride(1, "camerafollow", "0");
}
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:556
libStEx_gv_simpleCinematic_CameraLocked2[lp_player] = lp_onOff;
if ((lp_onOff == true)) {
PlayerOptionOverride(lp_player, "camerafollow", "0");
CameraLockInput(lp_player, true);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:570
}
else if (auto756E83E4_val == libCore_ge_GameModes_Tutorial1) {
PlayerOptionOverride(lp_player, "camerafollow", null);
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:573
}
else {
PlayerOptionOverride(lp_player, "camerafollow", null);
}
CameraLockInput(lp_player, false);
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:579
if (lv_p < 0) { break; }
MeleeSetOption(lv_p, c_meleeOptionXPGainDisable, false);
PlayerOptionOverride(lv_p, "selectuncontrolable", "1");
PlayerOptionOverride(lv_p, "gametooltips", "1");
PlayerOptionOverride(lv_p, "tickedunitstatus", "0");
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:580
MeleeSetOption(lv_p, c_meleeOptionXPGainDisable, false);
PlayerOptionOverride(lv_p, "selectuncontrolable", "1");
PlayerOptionOverride(lv_p, "gametooltips", "1");
PlayerOptionOverride(lv_p, "tickedunitstatus", "0");
PlayerOptionOverride(lv_p, "selectuncontrolable", "1");
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:581
PlayerOptionOverride(lv_p, "selectuncontrolable", "1");
PlayerOptionOverride(lv_p, "gametooltips", "1");
PlayerOptionOverride(lv_p, "tickedunitstatus", "0");
PlayerOptionOverride(lv_p, "selectuncontrolable", "1");
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:582
PlayerOptionOverride(lv_p, "gametooltips", "1");
PlayerOptionOverride(lv_p, "tickedunitstatus", "0");
PlayerOptionOverride(lv_p, "selectuncontrolable", "1");
}
return true;
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:2192
lv_playerProp = lv_playerProp+1;
}
PlayerOptionOverride(lv_player, "selectuncontrolable", "1");
PlayerOptionOverride(lv_player, "showcurrentordermodel", "0");
MeleeSetOption(lv_player, c_meleeOptionXPGainDisable, false);
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:2193
}
PlayerOptionOverride(lv_player, "selectuncontrolable", "1");
PlayerOptionOverride(lv_player, "showcurrentordermodel", "0");
MeleeSetOption(lv_player, c_meleeOptionXPGainDisable, false);
auto38C35668_g = UnitGroupSearch(null, 15, PlayerStartLocation(lv_player), 10.0, UnitFilter(0, 0, (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);