Difference between revisions of "Percent-chance Condition"

From AgentCubes
Jump to navigation Jump to search
imported>Corrina
imported>Corrina
 
Line 3: Line 3:
 
{| cellpadding="10" cellspacing="0" border="0" width="100%"
 
{| cellpadding="10" cellspacing="0" border="0" width="100%"
 
|-
 
|-
| align="left" valign="top" width="80" | '''Definition:'''
+
| align="left" valign="top" width="80" | '''Definition:'''  
 
| align="left" valign="top" width="100%" | The '''Percent-chance''' condition succeeds with a certain percent chance, as specified by a number or formula. For instance, with a value of 50 this condition will succeed, on average, 50% of the time. The Percent Chance condition chooses a random number between 1 and 100 whenever it is executed. If this number is less than the number indicated in its number field, the condition is true. Otherwise, the condition is false. Use this to introduce randomness to an agent's behavior.
 
| align="left" valign="top" width="100%" | The '''Percent-chance''' condition succeeds with a certain percent chance, as specified by a number or formula. For instance, with a value of 50 this condition will succeed, on average, 50% of the time. The Percent Chance condition chooses a random number between 1 and 100 whenever it is executed. If this number is less than the number indicated in its number field, the condition is true. Otherwise, the condition is false. Use this to introduce randomness to an agent's behavior.
 
|-
 
|-
| align="left" valign="top" width="80" | '''Parameters:'''
+
| align="left" valign="top" width="80" | '''Parameters:'''  
| align="left" valign="top" width="100%" | [[VAT Formula parameter|formula]]: a number or VAT formula
+
| align="left" valign="top" width="100%" | [[VAT Formula parameter|formula]]: ''a number or VAT formula''
 
|-
 
|-
| align="left" valign="top" width="80" | '''Example:'''
+
| align="left" valign="top" width="80" | '''Example:'''  
 
| align="left" valign="top" width="100%" | <br>
 
| align="left" valign="top" width="100%" | <br>
 
|}
 
|}
  
 
[[Category:AgentCubes_Conditions]]
 
[[Category:AgentCubes_Conditions]]

Latest revision as of 01:22, 21 April 2012

% chance action.png

Definition: The Percent-chance condition succeeds with a certain percent chance, as specified by a number or formula. For instance, with a value of 50 this condition will succeed, on average, 50% of the time. The Percent Chance condition chooses a random number between 1 and 100 whenever it is executed. If this number is less than the number indicated in its number field, the condition is true. Otherwise, the condition is false. Use this to introduce randomness to an agent's behavior.
Parameters: formula: a number or VAT formula
Example: