...
- name – the AIs name that will be displayed to end-users when they set up a skirmish or multiplayer game
- js – the filename of the AI javascript file (which must be in same folder as the ".ai" file)
Challenge scripts
Challenges may load scripts as well, if a [scripts] section is present in the challenge file, and has the keys ”extra” or ”rules”.
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[player_2] team = 1 difficulty = "Medium" position = 4 ai = semperfi.js |
See also: Create an AI that's only available in challenges
Events
The code in a javascript file is triggered by specially named functions called Events.
...