Difference between revisions of "AI"
Line 24: | Line 24: | ||
!Human readable description | !Human readable description | ||
!Example Values | !Example Values | ||
+ | !Default Value | ||
!Notes | !Notes | ||
|- | |- | ||
Line 29: | Line 30: | ||
|A number with decimal places. Can be positive or negative | |A number with decimal places. Can be positive or negative | ||
|3.2, 0.29, -10.2, 7.9999993 | |3.2, 0.29, -10.2, 7.9999993 | ||
+ | |0.0 | ||
| | | | ||
|- | |- | ||
Line 34: | Line 36: | ||
|A number without decimal places. Can be positive or negative. | |A number without decimal places. Can be positive or negative. | ||
|20, 69, 420, -1029, 0 | |20, 69, 420, -1029, 0 | ||
+ | |0 | ||
| | | | ||
|- | |- | ||
Line 39: | Line 42: | ||
|A chain of characters, basically any form of text. | |A chain of characters, basically any form of text. | ||
|"meow", "hello", " ", "I am a text" | |"meow", "hello", " ", "I am a text" | ||
+ | |"" | ||
|The quotes in the examples are not included in the actual string value. | |The quotes in the examples are not included in the actual string value. | ||
|- | |- | ||
Line 44: | Line 48: | ||
|A binary value that can either be true or false. | |A binary value that can either be true or false. | ||
|true, false | |true, false | ||
+ | |false | ||
| | | | ||
|- | |- | ||
Line 49: | Line 54: | ||
|A container type that contains two double values called x and y. | |A container type that contains two double values called x and y. | ||
|(-30.0, 0.0), (28.38, 13) | |(-30.0, 0.0), (28.38, 13) | ||
+ | |(0.0, 0.0) | ||
| | | | ||
|} | |} |
Revision as of 16:48, 13 May 2020
The AI is a very powerful tool that can be used to automate nearly anything. To use the AI you have to create AI-scripts in the headquarters.
AI-Scripts
An AI script contains three sections that control its behaviour:
- Impulses
- Conditions
- Actions
Impulse
An impulse or trigger is a certain event that activates an AI script. A script can contain zero, one or more impulses and will react to all of them equally. It is possible that a script can trigger multiple times before it has finished execution. In this case multiple instances of this script can run in parallel.
Condition
A condition is a requirement that has to be fulfilled in order for the script to start executing. If any of the specified conditions is not met then the whole script will not be executed once it is triggered by an impulse. During the execution the specified conditions have no effect.
Action
An action is something that the AI does when the script becomes active. The order of all actions is important where the action at the top is executed first and then all following actions are simply executed one by one. There is no way to execute multiple actions at the same time inside a single active script.
Datatypes
There are various types for data objects, placeholders or function arguments with each representing a different format of information.
Type | Human readable description | Example Values | Default Value | Notes |
---|---|---|---|---|
double | A number with decimal places. Can be positive or negative | 3.2, 0.29, -10.2, 7.9999993 | 0.0 | |
int | A number without decimal places. Can be positive or negative. | 20, 69, 420, -1029, 0 | 0 | |
string | A chain of characters, basically any form of text. | "meow", "hello", " ", "I am a text" | "" | The quotes in the examples are not included in the actual string value. |
bool | A binary value that can either be true or false. | true, false | false | |
Vector2 | A container type that contains two double values called x and y. | (-30.0, 0.0), (28.38, 13) | (0.0, 0.0) |