ChangeAIDifficulty: Difference between revisions

From Ashes of the Singularity - Official Wiki
Jump to navigation Jump to search
(Created page with "The ChangeAIDifficulty command changes an AI player's difficulty setting. ==Arguments== *'''Player''' - The index of the player to change *'''Difficulty''...")
 
No edit summary
Line 1: Line 1:
The ChangeAIDifficulty [[Script_Commands|command]] changes an AI player's difficulty setting.
The ChangeAIDifficulty [[Script_Commands|command]] changes an AI player's difficulty setting.
==Arguments==
 
== Arguments ==
 
*'''Player''' - The index of the player to change  
*'''Player''' - The index of the player to change  
*'''Difficulty''' - The name of the difficulty to set it to  
*'''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
== Common Usage ==
*Make an AI player weaker or tougher mid-script in response to the player completing or failing an objective
 
==Example==
*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  
 
== Example ==
 
   <Trigger Name="Difficulty1" Type="Difficulty" Difficulty="1" >
   <Trigger Name="Difficulty1" Type="Difficulty" Difficulty="1" >
     <ChangeAIDifficulty Player="1" Difficulty="Novice" />
     <ChangeAIDifficulty Player="1" Difficulty="Novice" />
Line 16: Line 23:
     <GrantTech Player="0" Tech="BuildingHPs" />
     <GrantTech Player="0" Tech="BuildingHPs" />
   </Trigger>
   </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.
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.
[[Category:Commands]]
[[Category:Commands]]

Revision as of 21:08, 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.