ChangeAIDifficulty: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
== Common Usage == | == Common Usage == | ||
*Setting AI difficulty at the beginning of the scenario in conjunction with the [[Difficulty_Trigger|difficulty]] | *Setting AI difficulty at the beginning of the scenario in conjunction with the [[Difficulty_Trigger|difficulty trigger]] | ||
*Make an AI player weaker or tougher mid-script in response to the player completing or failing an objective | *Make an AI player weaker or tougher mid-script in response to the player completing or failing an objective | ||
Latest revision as of 21:09, 18 January 2017
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.