ChangeAIDifficulty
Jump to navigation
Jump to search
The ChangeAIDifficulty command changes an AI player's difficulty setting.
Arguments
- Player - The index of the player to change
- Difficulty - The name of the difficulty to set it to
Common Usage
- Setting AI difficulty at the beginning of the scenario in conjunction with the difficulty trigger
- Make an AI player weaker or tougher mid-script in response to the player completing or failing an objective
Example
<Trigger Name="Difficulty1" Type="Difficulty" Difficulty="1" > <ChangeAIDifficulty Player="1" Difficulty="Novice" /> <GrantTech Player="0" Tech="HPs" /> <GrantTech Player="0" Tech="Weapons" /> <GrantTech Player="0" Tech="BuildingHPs" /> <GrantTech Player="0" Tech="HPs" /> <GrantTech Player="0" Tech="Weapons" /> <GrantTech Player="0" Tech="BuildingHPs" /> </Trigger>
This changes Player 1 (the main enemy) to Novice difficulty and gives the human player two free levels of combat upgrades when the Easy difficulty is selected at game start.