Jump to navigation Jump to search
Revision as of 19:18, 28 August 2021 by Lou Montana (talk | contribs) (Lou Montana moved page Script (File) to Script File: name standard)
A script file is multiple commands and arguments defining wanted behaviour from the game, all grouped together in a textfile. This code does a specific task handled by the game engine. The common extensions for Arma scripts are .sqf and .sqs, depending on the used syntax: SQF or (deprecated) SQS Syntax.
In Operation Flashpoint, scripts are limited to SQS Syntax.
- See exec
The already existing (since Operation Flashpoint v1.85) SQF Syntax was introduced for scripts in Armed Assault. SQS Syntax is still usable but is considered deprecated since.
Scripts can be executed from several points in the game:
- Other scripts
- Other functions
- Init fields and (de)activation triggers in the Mission Editor
- Event Handlers in addon config files
The commands to execute scripts are:
- exec starts a thread for a script in SQS Syntax.
- execVM preprocesses and compiles a SQF Syntax script file and starts a thread for it.
- call adds provided Code to the stack and wait for it to execute, then returns the code's last returned value.