Difference between revisions of "TwostateXML"
From Elite Wiki
(XML example AI) |
Cholmondely (talk | contribs) m (Tagged as Legacy scripting) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | <dict> |
||
− | <key>STATE_1</key> |
||
<dict> |
<dict> |
||
− | <key> |
+ | <key>STATE_1</key> |
− | < |
+ | <dict> |
− | < |
+ | <key>ENTER</key> |
− | < |
+ | <array> |
− | < |
+ | <string></string> |
− | <array> |
+ | </array> |
− | < |
+ | <key>MESSAGE_A</key> |
− | < |
+ | <array> |
− | <string> |
+ | <string>method1: value</string> |
− | </ |
+ | <string>method2</string> |
− | < |
+ | <string>method3</string> |
− | <array> |
+ | </array> |
− | < |
+ | <key>MESSAGE_B</key> |
− | < |
+ | <array> |
− | < |
+ | <string>method4</string> |
− | < |
+ | <string>setStateTo: STATE_2</string> |
− | < |
+ | <key>EXIT</key> |
− | < |
+ | <array> |
− | < |
+ | <string></string> |
− | <array> |
+ | </array> |
− | < |
+ | <key>UPDATE</key> |
− | < |
+ | <array> |
+ | <string></string> |
||
+ | </array> |
||
+ | </dict> |
||
+ | <key>STATE_2</key> |
||
+ | <dict> |
||
+ | <key>ENTER</key> |
||
+ | <array> |
||
+ | <string></string> |
||
+ | </array> |
||
+ | <key>MESSAGE_A</key> |
||
+ | <array> |
||
+ | <string>method1: another_value</string> |
||
+ | <string>method5</string> |
||
+ | </array> |
||
+ | <key>MESSAGE_B</key> |
||
+ | <array> |
||
+ | <string>method6</string> |
||
+ | <string>method7</string> |
||
+ | <string>setStateTo: STATE_1</string> |
||
+ | <key>EXIT</key> |
||
+ | <array> |
||
+ | <string></string> |
||
+ | </array> |
||
+ | <key>UPDATE</key> |
||
+ | <array> |
||
+ | <string></string> |
||
+ | </array> |
||
+ | </dict> |
||
</dict> |
</dict> |
||
− | <key>STATE_2</key> |
||
− | <dict> |
||
− | <key>ENTER</key> |
||
− | <array> |
||
− | <string></string> |
||
− | </array> |
||
− | <key>MESSAGE_A</key> |
||
− | <array> |
||
− | <string>method1: another_value</string> |
||
− | <string>method5</string> |
||
− | </array> |
||
− | <key>MESSAGE_B</key> |
||
− | <array> |
||
− | <string>method6</string> |
||
− | <string>method7</string> |
||
− | <string>setStateTo: STATE_1</string> |
||
− | <key>EXIT</key> |
||
− | <array> |
||
− | <string></string> |
||
− | </array> |
||
− | <key>UPDATE</key> |
||
− | <array> |
||
− | <string></string> |
||
− | </array> |
||
− | </dict> |
||
− | </dict> |
||
− | [[Methods for AI]] |
||
+ | Example script of a two-state AI in XML. You can see why ASCII is perferable for AI's. |
||
− | [[Category:OXP_Howto]] |
||
+ | |||
+ | [[OXP_howto_AI|BACK]] |
||
+ | |||
+ | [[Category:Oolite scripting]] [[Category:Legacy scripting]] |
Latest revision as of 10:48, 9 August 2021
<dict> <key>STATE_1</key> <dict> <key>ENTER</key> <array> <string></string> </array> <key>MESSAGE_A</key> <array> <string>method1: value</string> <string>method2</string> <string>method3</string> </array> <key>MESSAGE_B</key> <array> <string>method4</string> <string>setStateTo: STATE_2</string> <key>EXIT</key> <array> <string></string> </array> <key>UPDATE</key> <array> <string></string> </array> </dict> <key>STATE_2</key> <dict> <key>ENTER</key> <array> <string></string> </array> <key>MESSAGE_A</key> <array> <string>method1: another_value</string> <string>method5</string> </array> <key>MESSAGE_B</key> <array> <string>method6</string> <string>method7</string> <string>setStateTo: STATE_1</string> <key>EXIT</key> <array> <string></string> </array> <key>UPDATE</key> <array> <string></string> </array> </dict> </dict>
Example script of a two-state AI in XML. You can see why ASCII is perferable for AI's.