SQS to SQF conversion
Topic · Markdown · JSON · original wiki page
SQF Syntax has been introduced in Operation Flashpoint: Resistance v1.85 and is the Arma series' main scripting language until Arma 3. The main differences with SQS Syntax are:
- execVM is used (instead of exec for SQS)
- Every command has to end with a semicolon (
;) - the following commands disappeared:
- Line returns do not impact code
- SQF can return a variable, where SQS cannot
Conversion Examples
| SQS | SQF |
|---|---|
| Comment | |
; This is a commentcomment "this is a comment";"this is a comment"; |
// This is single-line commentcomment "this is a comment";"this is a comment"; |
| Conditional Wait | |
@CONDITION@ not alive player |
waitUntil { CONDITION };waitUntil { not alive player }; |
| Delay | |
~DELAY~5 |
sleep DELAY;sleep 5; |
| Conditional Command | |
? CONDITION : COMMAND? alive player : player setDammage 1 |
if (CONDITION) then { COMMAND };if (alive player) then { player setDammage 1 }; |
| Multi-Conditional Command | |
|
|
| Cycle | |
|
|
| Cycle With Step | |
|
|
| Structured Conditional Command | |
|
|
| Exiting | |
|
|