ChangeAIDifficulty

From Ashes of the Singularity - Official Wiki
Revision as of 21:09, 18 January 2017 by Patiobattle04 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.