New to ArmA 2: FSM - An introduction
This entry is not about a kind of religion, it's about the finite state machine.
To be honest: It already exists in Armed Assault, but without proper documentation and proper script commands it was worthless.
In ArmA II we finally has the script command and the tool.
But first:
What's a finite state machine?
It's an informatics concept. More details can be found on Wikipedia. I only want to refer to the interesting parts ![]()
We have several states including on start and one end state. They are connected with conditions. The machine starts in the start state. Then it will check the conditions. If one is true, it will move into the state the condition is connected to. Then it checks the conditions of the new state and so on, till it reaches the end state.
How is this useful?
ArmA Script Recoded 1.3
Since the last mention of ArmA Script a lot has changed:
We have minor improvements at the styling of SQF. Then there is a new menu point to display a variable via hint, *Chat or diag_log.

But one of the major improvements is the support for mikero's PboDll:
It allows to check a config.cpp or description.ext for errors and will display them within the document:

As an additional feature it allows to recreate a CfgPatches section including all defined units and weapons.
ArmA Script Recoded
ArmA Script is a plugin for Notepad++ which adds support for SQF.
Its supports highlighting of local or global variable, functions and more. It adds folding, including folding of arrays.
But it didn't support the new commands of ArmA II and since the latest code base was lost, it required a recoding.
I finally managed to recode it ![]()
It now has even a nicer code base than it has before. But what is more important: It has full support for the new ArmA II commands.
Download:
ArmA Script Recoded (for ArmA II)
ArmA Script (for Armed Assault)
If you're missing a feature: Feel free to ask.
Changelog 11/10/2009
| RTE Capture: | 1.54 |
| ArmA II | |
| ION_RTE: | 514 |
| ION_RTE_Dta: | 514 |
| Armed Assault | |
| ION_RTE: | 508 |
| ION_RTE_Dta: | 441 |
RTE Capture:
Added recursive search for mod folders.
New to ArmA 2: elseif
elseif? We already have else if!
More or less. We have else { if ... } which is different. Let's look at an example:
- if (Area1Clear) then {
- Convoi_Next_Waypoint = Area1;
- } else {
- if (Area2Clear) then {
- Convoi_Next_Waypoint = Area2;
- } else {
- if (Area3Clear) then {
- Convoi_Next_Waypoint = Area3;
- } else {
- Convoi_Next_Waypoint = objNull;
- //call for reinforcement...
- };
- };
- };
This is getting ugly as soon as we require more checks.
