# Modify Player Score (Integer)

Grammar — Modify player p prop: Set To val
FlagsNative | Action

Modifies player score such as units killed.

# Arguments

  • int — Player
  • string [ gamelink::ScoreValue ] — Score
  • int — Value

Returns — void

native void PlayerScoreValueSetFromInt(
	int player,
	string value,
	int amount,
);

Category: Player / Player Settings

# Examples

# mods/heroesdata.stormmod

GameDataHelperLib.galaxy

// L1704
PlayerScoreValueSetFromInt(lp_killingPlayer, "LostVikingsVikingBriberyStackScore", UnitBehaviorCount(lv_vikingUnit, "LostVikingsVikingBriberyStacks"))
// L5770
PlayerScoreValueSetFromInt(lv_abathurPlayer, "EvolutionCompleteStacks", lv_evolutionCompleteStacks)
// L10751
PlayerScoreValueSetFromInt(lv_player, "JainaFrostbiteDamage", 0)
// L10792
PlayerScoreValueSetFromInt(lv_player, "JainaFrostbiteDamage", 0)
// L10835
PlayerScoreValueSetFromInt(lv_owner, "JainaFrostbiteDamage", (PlayerScoreValueGetAsInt(lv_owner, "JainaFrostbiteDamage") + FixedToInt(lv_damageValue)))
// L10898
PlayerScoreValueSetFromInt(lv_player, "JainaFrostbiteDamage", libGDHL_gv_heroJainaFrostbiteConstant)
// L12225
PlayerScoreValueSetFromInt(lv_leoricPlayer, "DeadHeroLastKnownHealth", FixedToInt(UnitGetPropertyFixed(lv_leoric, c_unitPropLife, c_unitPropCurrent)))
// L12339
PlayerScoreValueSetFromInt(lv_leoricPlayer, "DeadHeroLastKnownHealth", 0)
// L12681
PlayerScoreValueSetFromInt(EventPlayerEffectUsedUnitOwner(c_effectPlayerCaster), "LostVikingsVikingBriberyStackScore", UnitBehaviorCount(lv_vikingUnit, "LostVikingsVikingBriberyStacks"))
// L12702
PlayerScoreValueSetFromInt(UnitGetOwner(EventUnit()), "LostVikingsVikingBriberyStackScore", 0)

# mods/heroesdata.stormmod

GameLib.galaxy

// L11224
PlayerScoreValueSetFromInt(lp_player, lp_score, lp_value)

# mods/heroesdata.stormmod

SupportLib.galaxy

// L4306
PlayerScoreValueSetFromInt(lv_itPlayer, "BalanceProbe", 0)
// L4359
PlayerScoreValueSetFromInt(lv_itPlayer, "BalanceProbe", 0)

# mods/heroesdata.stormmod

UILib.galaxy

// L6044
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightHeroDamageBoolean", 1)
// L6047
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightHeroDamageBoolean", 0)
// L6050
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightHealingBoolean", 1)
// L6053
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightHealingBoolean", 0)
// L6056
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightDamageTakenBoolean", 1)
// L6059
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightDamageTakenBoolean", 0)
// L6062
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightSiegeDamageBoolean", 1)
// L6065
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightSiegeDamageBoolean", 0)
// L6068
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightXPContributionBoolean", 1)
// L6071
PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightXPContributionBoolean", 0)

# mods/heromods/chogall.stormmod

LibHCHO.galaxy

// L1364
PlayerScoreValueSetFromInt(lv_initialChoPlayerID, "GenericHeroTalentStackCounter", PlayerScoreValueGetAsInt(lv_initialGallPlayerID, "GenericHeroTalentStackCounter"))
// L1365
PlayerScoreValueSetFromInt(lv_initialGallPlayerID, "GenericHeroTalentStackCounter", 0)

# mods/starcoop/starcoop.sc2mod

LibCOOC.galaxy

// L113
PlayerScoreValueSetFromInt(lp_player, lp_scoreType, FixedToInt((libCOOC_gv_cC_MissionScoreValues[lv_scoreIndex][lp_player] * libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player), 1.0, 1.2, 1.5, 2.0, 2.0, 2.0))))
// L114
PlayerScoreValueSetFromInt(lp_player, "TotalMissionScore", FixedToInt((lv_totalScore * libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player), 1.0, 1.2, 1.5, 2.0, 2.0, 2.0))))
// L1939
PlayerScoreValueSetFromInt(lp_player, "MetaExperience", lv_totalXP)
// L1940
PlayerScoreValueSetFromInt(lp_player, "BonusObjectiveXP", lv_objectiveXP)
// L1941
PlayerScoreValueSetFromInt(lp_player, "MissionXP", lv_baseXP)
// L1942
PlayerScoreValueSetFromInt(lp_player, "UnitsKilledPoints", 0)
// L1943
PlayerScoreValueSetFromInt(lp_player, "UnitsMadePoints", 0)
// L1944
PlayerScoreValueSetFromInt(lp_player, "TechnologyPoints", 0)
// L1945
PlayerScoreValueSetFromInt(lp_player, "StructuresKilledPoints", 0)
// L1946
PlayerScoreValueSetFromInt(lp_player, "StructuresMadePoints", 0)