# Set State

Grammar — Sets the state at index index for player player to state state
FlagsNative | Action

Sets the value of the specified state index for a player. The state is a per player integer array that can be useful to AI scripting.

# Arguments

  • int — Player
  • int — Index
  • int — State

Returns — void

native void AISetSpecificState(
	int player,
	int index,
	int state,
);

Category: AI Advanced / Utility / Actions

# Examples

# mods/core.sc2mod

MeleeAI.galaxy

// L190
AISetSpecificState(player, e_attackState, attackState)
// L207
AISetSpecificState(player, e_mainState, mainState)
// L208
AISetSpecificState(player, e_mainSubState, mainSubState)
// L190
AISetSpecificState(player, e_attackState, attackState)
// L207
AISetSpecificState(player, e_mainState, mainState)
// L208
AISetSpecificState(player, e_mainSubState, mainSubState)