# Turn Player Flag On/Off
Grammar — Turn player player state flag value
Flags —Native
|Action
Enables or disables the specified flag for the player.
# Arguments
int
— Playerint
[ preset::PlayerState ] — Player Flagbool
[ preset::OnOffOption ] — On/Off
Returns — void
native void PlayerSetState(
int inPlayer,
int inState,
bool inVal,
);
# Related
Category: Player / Player Settings
- [F] —
void
— Modify Player Property (Integer) — ( PlayerModifyPropertyInt ) - [F] —
void
— Modify Player Property (Real) — ( PlayerModifyPropertyFixed ) - [F] —
int
— Player Property (Integer) — ( PlayerGetPropertyInt ) - [F] —
fixed
— Player Property (Real) — ( PlayerGetPropertyFixed ) - [F] —
void
— Modify Player Score (Integer) — ( PlayerScoreValueSetFromInt ) - [F] —
void
— Modify Player Score (Real) — ( PlayerScoreValueSetFromFixed ) - [F] —
int
— Player Score Value (Integer) — ( PlayerScoreValueGetAsInt ) - [F] —
fixed
— Player Score Value (Real) — ( PlayerScoreValueGetAsFixed ) - [F] —
void
— Turn Player Flag On/Off — ( PlayerSetState ) - [F] —
bool
— Player Flag Check — ( PlayerGetState ) - [F] —
bool
— Player License Check — ( PlayerHasLicense ) - [F] —
bool
— Player Access Check — ( PlayerHasAccessTo ) - [F] —
bool
— Player Has Reward — ( PlayerHasReward ) - [F] —
bool
— Player Has Talent — ( PlayerHasTalent ) - [F] —
text
— Name Of Player — ( PlayerName ) - [F] —
string
— Handle Of Player — ( PlayerHandle ) - [F] —
string
[ gamelink::Race ] — Race Of Player — ( PlayerRace ) - [F] —
string
[ gamelink::Hero ] — Hero Of Player — ( PlayerHero ) - [F] —
string
[ gamelink::Skin ] — Skin Of Player — ( PlayerSkin ) - [F] —
string
[ gamelink::Mount ] — Mount Of Player — ( PlayerMount ) - [F] —
string
[ gamelink::Spray ] — Spray Of Player — ( PlayerSpray ) - [F] —
string
[ gamelink::Artifact ] — Artifact Of Player — ( PlayerArtifact ) - [F] —
int
— Artifact Rank Of Player — ( PlayerArtifactRank ) - [F] —
string
[ gamelink::Commander ] — Commander Of Player — ( PlayerCommander ) - [F] —
int
— Commander Level Of Player — ( PlayerCommanderLevel ) - [F] —
int
— Commander Mastery Level Of Player — ( PlayerCommanderMasteryLevel ) - [F] —
int
— Commander Mastery Talent Rank Of Player — ( PlayerCommanderMasteryTalentRank ) - [F] —
int
— Commander Selected Prestige Of Player — ( PlayerCommanderSelectedPrestige ) - [F] —
int
— Brutal Plus Difficulty of Player — ( PlayerBrutalPlusDifficulty ) - [F] —
int
— Retry Mutation Index of Player — ( PlayerRetryMutation ) - [F] —
int
— Allied Commander Enemy Wave Type — ( PlayerACEnemyWaveType ) - [F] —
point
— Start Location Of Player — ( PlayerStartLocation ) - [F] —
int
[ preset::PlayerController ] — Controller Of Player — ( PlayerType ) - [F] —
int
[ preset::PlayerStatus ] — Status Of Player — ( PlayerStatus ) - [F] —
void
— Set Player Color — ( PlayerSetColorIndex ) - [F] —
void
— Set Player Race — ( PlayerSetRace ) - [F] —
void
— Set Player Hero — ( PlayerSetHero ) - [F] —
void
— Set Player Skin — ( PlayerSetSkin ) - [F] —
void
— Set Player Console Skin — ( PlayerSetConsoleSkin ) - [F] —
void
— Apply Player Skin — ( PlayerApplySkin ) - [F] —
void
— Apply Player Skin (Replacing Existing Unit) — ( libNtve_gf_PlayerApplySkinReplacingExistingUnit ) - [F] —
void
— Set Player Mount — ( PlayerSetMount ) - [F] —
void
— Set Player Spray — ( PlayerSetSpray ) - [F] —
void
— Set Player Commander — ( PlayerSetCommander ) - [F] —
void
— Set Player Commander Level — ( PlayerSetCommanderLevel ) - [F] —
void
— Set Player Commander Mastery Level — ( PlayerSetCommanderMasteryLevel ) - [F] —
void
— Set Player Death Timer — ( PlayerSetDeathTimer ) - [F] —
void
— Set Player Bounds — ( PlayerSetBounds ) - [F] —
void
— Add Player Talent — ( PlayerAddTalent ) - [F] —
void
— Remove Player Talent — ( PlayerRemoveTalent ) - [F] —
void
— Add Player Response — ( PlayerAddResponse ) - [F] —
void
— Remove Player Response — ( PlayerRemoveResponse ) - [F] —
void
— Clear Player Response — ( PlayerClearResponse ) - [F] —
int
[ playercolor ] — Player Color — ( PlayerGetColorIndex ) - [F] —
void
— Override Player Option — ( PlayerOptionOverride ) - [F] —
string
— Player Hotkey Profile — ( PlayerGetHotkeyProfile ) - [F] —
void
— Player Property Changed — ( TriggerAddEventPlayerPropChange ) - [F] —
void
— Player Joins Game — ( TriggerAddEventPlayerJoin ) - [F] —
void
— Player Leaves Game — ( TriggerAddEventPlayerLeft ) - [F] —
int
— Triggering Player — ( EventPlayer ) - [F] —
int
[ preset::Player_Property_Get ] — Triggering Player Property — ( EventPlayerProperty ) - [F] —
int
— Triggering Player Property Change (Integer) — ( EventPlayerPropertyChangeInt ) - [F] —
fixed
— Triggering Player Property Change (Real) — ( EventPlayerPropertyChangeFixed ) - [F] —
void
— Player Add Label — ( PlayerAddLabel ) - [F] —
void
— Player Remove Label — ( PlayerRemoveLabel ) - [F] —
void
— Player Remove All Labels — ( PlayerRemoveAllLabels ) - [F] —
bool
— Player Has Label — ( PlayerHasLabel ) - [F] —
void
— Player Add Reward — ( PlayerAddReward )
# Examples
# campaigns/liberty.sc2campaign
// L2823
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, false)
// L2940
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, true)
// L2665
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, false)
// L2804
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, true)
// L2810
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, false)
// L2959
PlayerSetState(gv_pLAYER_USER, c_playerStateXPGain, true)
// L6247
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5346
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L529
PlayerSetState(gv_pLAYER03_COLONIST, c_playerStateDisplayInLeaderPanel, false)
// L530
PlayerSetState(gv_pLAYER05_COLONISTSTRUCTURES, c_playerStateDisplayInLeaderPanel, false)
// L531
PlayerSetState(gv_pLAYER06_TERRORFLEET, c_playerStateDisplayInLeaderPanel, false)
// L532
PlayerSetState(gv_pLAYER07_RESOURCES, c_playerStateDisplayInLeaderPanel, false)
// L6530
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L988
PlayerSetState(gv_p03_VIROPHAGE, c_playerStateDisplayInLeaderPanel, false)
// L989
PlayerSetState(gv_p05_COLONIST, c_playerStateDisplayInLeaderPanel, false)
// L990
PlayerSetState(gv_p06_COLONIST, c_playerStateDisplayInLeaderPanel, false)
// L991
PlayerSetState(gv_p07_ZERG_INFESTED, c_playerStateDisplayInLeaderPanel, false)
// L704
PlayerSetState(gv_pLAYER_05_ABANDONEDVEHICLES, c_playerStateDisplayInLeaderPanel, false)
// L5825
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L5448
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L5585
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L5659
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L5484
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L5697
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L5819
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L861
PlayerSetState(gv_p06_CIVILIANS, c_playerStateShowScore, false)
// L862
PlayerSetState(gv_p07_HORNERBASE, c_playerStateShowScore, false)
// L2126
PlayerSetState(gv_p06_CIVILIANS, c_playerStateFidgetingEnabled, false)
// L6297
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L6486
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L6561
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L6823
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L7028
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L752
PlayerSetState(gv_p07_NEUTRAL, c_playerStateShowScore, false)
// L11258
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L11410
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L11599
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L11739
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L11980
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L12095
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L12178
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L12435
PlayerSetState(gv_p01_USER, c_playerStateXPGain, true)
// L12688
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L375
PlayerSetState(gv_p2_DOMINION_RED, c_playerStateFidgetingEnabled, false)
// L376
PlayerSetState(gv_p4_ACTORS_BLUE, c_playerStateFidgetingEnabled, false)
// L377
PlayerSetState(gv_p3_RIKSVILLE_YELLOW, c_playerStateDisplayInLeaderPanel, false)
// L378
PlayerSetState(gv_p4_ACTORS_BLUE, c_playerStateDisplayInLeaderPanel, false)
// L2494
PlayerSetState(gv_p3_RIKSVILLE_YELLOW, c_playerStateFidgetingEnabled, true)
// L4899
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5054
PlayerSetState(gv_p1_USER, c_playerStateXPGain, true)
// L5151
PlayerSetState(gv_p1_USER, c_playerStateXPGain, true)
// L5307
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5423
PlayerSetState(gv_p1_USER, c_playerStateXPGain, true)
// L412
PlayerSetState(gv_pLAYER_03_COLONISTS, c_playerStateShowScore, false)
// L413
PlayerSetState(gv_pLAYER_04_REBELS, c_playerStateShowScore, false)
// L414
PlayerSetState(gv_pLAYER_05_PATROL, c_playerStateShowScore, false)
// L4842
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L594
PlayerSetState(gv_pLAYER05_ZERG_NOAI, c_playerStateDisplayInLeaderPanel, false)
// L595
PlayerSetState(gv_pLAYER06_REBELS, c_playerStateDisplayInLeaderPanel, false)
// L596
PlayerSetState(gv_pLAYER07_HYPERION, c_playerStateDisplayInLeaderPanel, false)
// L597
PlayerSetState(gv_pLAYER08_TAUREN, c_playerStateDisplayInLeaderPanel, false)
// L598
PlayerSetState(gv_pLAYER09_COLONISTS, c_playerStateDisplayInLeaderPanel, false)
// L5080
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L5040
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L4244
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L633
PlayerSetState(gv_p4_DOMINION_PURPLE, c_playerStateShowScore, false)
// L634
PlayerSetState(gv_p5_DOMINION_GREY, c_playerStateShowScore, false)
// L635
PlayerSetState(gv_p6_DOMINION_ORANGE, c_playerStateShowScore, false)
// L636
PlayerSetState(gv_p7_PRISONER_YELLOW, c_playerStateShowScore, false)
// L637
PlayerSetState(gv_p8_ALLIED_PINK, c_playerStateShowScore, false)
// L638
PlayerSetState(gv_p9_ALLIED_GREEN, c_playerStateShowScore, false)
// L639
PlayerSetState(gv_p9_ALLIED_GREEN, c_playerStateShowScore, false)
// L640
PlayerSetState(gv_p11_ALLIED_CELLBLOCK_A, c_playerStateShowScore, false)
// L641
PlayerSetState(gv_p12_ALLIED_CELLBLOCK_B, c_playerStateShowScore, false)
// L645
PlayerSetState(gv_p0_NEUTRAL, c_playerStateFidgetingEnabled, false)
// L534
PlayerSetState(gv_pLAYER03_DROPSHIPS, c_playerStateShowScore, false)
// L535
PlayerSetState(gv_pLAYER04_NOVA, c_playerStateShowScore, false)
// L5957
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L6089
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, true)
// L6237
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L6373
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, true)
// L358
PlayerSetState(gv_p3_TEMPLE, c_playerStateShowScore, false)
// L359
PlayerSetState(gv_p6_FIRST_PROTOSS, c_playerStateShowScore, false)
// L5009
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5167
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L5427
PlayerSetState(gv_p1_USER, c_playerStateXPGain, true)
// L5659
PlayerSetState(gv_p1_USER, c_playerStateXPGain, false)
// L6073
PlayerSetState(gv_p01_USER, c_playerStateXPGain, false)
// L3644
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L3854
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, true)
// L3932
PlayerSetState(gv_pLAYER01_USER, c_playerStateXPGain, false)
// L3934
PlayerSetState(gv_pLAYER02_PROTOSS, c_playerStateFidgetingEnabled, false)
// L3935
PlayerSetState(gv_pLAYER03_PROTOSS, c_playerStateFidgetingEnabled, false)
// L3936
PlayerSetState(gv_pLAYER04_PROTOSS, c_playerStateFidgetingEnabled, false)
// L4850
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L4980
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, true)
// L5084
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L5280
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, true)
// L5513
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false)
// L5659
PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, true)