Skip to content

Arma 2 OA Command Version Reference

rayswaynl edited this page Jun 2, 2026 · 14 revisions

Arma 2 OA — SQF command version reference (A3 contrast)

Independent BIKI-verified version-evidence companion to the canonical External Arma 2 OA reference guide. That page maps concepts → references and how-to-use; this page is the dated provenance log: the first game / version of each command this fork touches, so an agent can decide at a glance whether a command is safe for the Arma 2 OA 1.63 / 1.64 target. Verified read-only against the Bohemia Community Wiki (community.bistudio.com) on 2026-06-02 — reading a command's version badge needs no account.

Why this matters

The fastest way to break OA mission SQF is to "fix" it with Arma 3 reflexes: many everyday A3 commands simply did not exist in 2010–2013 and throw undefined command errors on OA. This page is the quick yes/no, with the OA-safe replacement.

Arma 3-only — do NOT use in OA mission SQF

Command / form First game · version Arma 2 OA replacement
params ["_a","_b"] Arma 3 · 1.48 private ["_a","_b"]; _a = _this select 0; _b = _this select 1;
setGroupOwner / groupOwner Arma 3 · 1.40 No equivalent — OA cannot transfer group locality; it follows the group leader's owner. (Impacts DR-21 HC re-delegation: you can redirect future spawns to a surviving HC, but cannot transfer live AI.)
array select [start, count] Arma 3 · 1.32 single-index select N, or build with for/forEach.
string select [start, length] (substring) Arma 3 · 1.28 toArray / toString (no native substring in OA).
array select {expression} (filter) Arma 3 · 1.56 { if (cond) then { … } } forEach _arr.
array apply {expression} (map) Arma 3 · 1.56 { _x = f _x } forEach _arr, or build a new array in a for/forEach loop. Source has zero apply array-command uses (only the English word in comments); it previously appeared in a draft doc fix-snippet and is kept here as a regression warning.
isEqualType Arma 3 · 1.54 typeName _x == "ARRAY" (etc.).
isEqualTo Arma 3 · 1.16 == for simple comparable values; use isNil, typeName and explicit shape/count checks for validation. Do not use this in OA copyable snippets.
remoteExec / remoteExecCall Arma 3 · 1.50 publicVariable + addPublicVariableEventHandler (this mission's PVF wrappers).
parseSimpleArray Arma 3 · 1.68 call compile — trusted input only (see DR-1 / DR-7 / DR-46).
ext callExtension [fn, args] (array form) Arma 3 · 1.68 string form: ext callExtension "code,args".
private _x = value (inline-assign) Arma 3 style private "_x"; _x = value;
setUnitLoadout / getUnitLoadout Arma 3 · 1.58 No OA equivalent. OA loadouts come from config classes plus addWeapon/addMagazine/*CargoGlobal and setVehicleInit. Confirmed absent from source (0 hits): Tools/LoadoutManager generates config-driven loadouts; it does not use the A3 loadout API. Do not introduce.
hideObjectGlobal / enableSimulationGlobal Arma 3 · 1.12 A3-only Global variants. OA only has the local hideObject / enableSimulation; the effect is per-machine and must be re-applied (or driven by the mission's PV pattern) for global state. Confirmed absent from source (0 hits) — do not introduce a Global variant by reflex.
selectRandom Arma 3 · 1.56 Use the repo idiom _arr select floor(random count _arr) (Common/Init/Init_Town.sqf:39, Server/AI/AI_AdvancedRespawn.sqf) or _arr call BIS_fnc_selectRandom (OA-safe, see below). Confirmed absent — the 4 selectRandom source hits are all BIS_fnc_selectRandom. ⚠ Do not "simplify" call BIS_fnc_selectRandom into the selectRandom command: the function is OA-safe, the command is not.
splitString / joinString Arma 3 · 1.50 No OA native split/join — parse with toArray/toString + a manual forEach. Confirmed absent (0 hits).
trim (+ regexFind / regexMatch) Arma 3 · 2.02 (regex 2.x) No OA equivalent; trim/match manually via toArray/toString. Confirmed absent.

Confirmed available in Arma 2 OA

Command / form First · version Note
obj getVariable ["name", default] ArmA 1.00 (obj/group); OA 1.60 (namespace) Default-value form is OA-safe on missionNamespace. CAVEAT: on objNull, A2 returns undefined, not the default (A3 fixed this).
obj setVariable ["name", val, true] ArmA 1.00 Public-broadcast 3rd arg is OA-safe.
publicVariableServer / publicVariableClient OA 1.62 client→server / server→one-client targeting.
callExtension (string form) OA 1.60 Blocking — keep out of hot loops.
diag_tickTime Arma 2 · 1.00 Real-time, high-precision elapsed seconds; unscaled and does not pause with game time. Commonly mis-remembered as A3-only, but it is A2-era and OA-safe — the correct clock for perf instrumentation. Repo uses it as the PerformanceAudit_Record stopwatch (~62 files, e.g. Client/Client_UpdateRHUD.sqf:187). Do not "modernize" it away.
uiSleep Arma 2 · 1.05 (also OA 1.50) Like sleep but not scaled by accelerated/skipped game time — suspends on real-time cadence (correct for server housekeeping loops). Also frequently assumed A3-only; it is OA-safe. Repo uses it in the AntiStack loops (Server/Module/AntiStack/mainLoop.sqf:16, flushLoop.sqf) and Server/FSM/restorers/buildings_restorer.sqf:26 (7 files).
getPosATL / setPosATL Arma 2 · 1.03 Above-terrain-level coordinates. OA-safe (7 / 2 files).
createVehicleLocal ArmA 1.00 Creates a client-local object not synchronized over the network (netId is 0:0) — use only for local FX/markers; other machines will not see it. 6 files.
addWeaponCargoGlobal / addMagazineCargoGlobal OA 1.55 Global MP effect (cargo synced to all clients) — the MP-correct cargo add, not A3-only. Repo gear-equip path (Common/Functions/Common_EquipBackpack.sqf, Common_EquipVehicle.sqf).
BIS_fnc_selectRandom Arma 2 · 1.00 (OA 1.50) OA-safe function (_arr call BIS_fnc_selectRandom) returning a random array element — distinct from the A3-only selectRandom command in the avoid-list above. Repo: spawn-pad pick in Client/Functions/Client_BuildUnit.sqf:59/85/111/135.
allGroups, call, compile, preprocessFileLineNumbers, typeName, isNil, format, localize, hintSilent, diag_log, diag_fps, publicVariable, addPublicVariableEventHandler, toArray, toString, setVectorDirAndUp (ArmA 1.09) OFP / ArmA / A2 All OA-safe.

Object scans & spatial queries — all OA-safe; pick the right one

These are heavily used across the fork and all date to OFP/ArmA/A2, so the trap here is semantic, not version: choosing a scan whose filter silently excludes what you need.

Command First · version Returns / when to use Repo
nearestObjects [pos, classes, radius] A2 · 1.00 Array sorted by distance; isKindOf class matching; [] = all classes (slowest). Supply command-center scan (Server/Module/supplyMission/supplyMissionStarted.sqf:45,61) — currently [] then filters for Base_WarfareBUAVterminal (DR-39). 16 files.
nearEntities [classes, radius] A2 · 1.00 Unsorted; alive units / vehicles / game-logics only — excludes dead objects, buildings/structures, and crew inside vehicles. BI notes it is "much faster" than nearestObjects for soldiers/vehicles. Camp/depot/airfield proximity (nearEntities [WFBE_Logic_Camp, _range]; Client_GetClosestCamp/Depot/Airport.sqf). 39 files.
nearObjects [classes, radius] ArmA 1.00 Unsorted radius scan, optional class filter; does include structures/dead objects. 5 files.
nearestObject OFP 1.00 Single nearest object of a type (a hardcoded-50 m form exists). 27 files.

Guardrail (DR-39): the supply command-center scan targets the Base_WarfareBUAVterminal structure, so it cannot be "optimized" by swapping to nearEntities — that command returns no buildings and would silently match nothing. The OA-safe narrowing is a class-filtered nearestObjects (or nearObjects) plus isKindOf, not an entity scan. See Supply mission scan narrowing and Performance opportunity sweep.

OA-safe but removed in Arma 3 — the inverse trap

These commands exist and work in OA 1.64 but were disabled in Arma 3 for security. An agent porting Arma 3 reflexes can fall for the opposite of the avoid-list above — assuming they are gone or unsafe and rewriting them — when they are load-bearing in this fork. Keep them.

Command First · version OA status / repo use
setVehicleInit OFP:Elite / A2 · 1.00 (OA 1.50) OA-safe; disabled in Arma 3 (security). Global Effect — the init string is broadcast and runs on every machine. Repo passes only hardcoded literal init strings: textures via Common/Functions/Common_AddVehicleTexture.sqf, fixed init-script calls (Client/Module/UAV/uav.sqf:30, artillery in Client/Functions/Client_FNC_Special.sqf:202). Because the strings are constants, this is not a network-derived injection surface beyond the documented PVF dispatcher class (DR-1). 17 files.
processInitCommands OFP:Elite / A2 · 1.00 (OA 1.50) OA-safe; disabled in Arma 3. Runs the queued setVehicleInit statements once; paired immediately after setVehicleInit in Common_CreateUnit.sqf/Common_CreateVehicle.sqf, construction sites and UAV spawn. 19 files.

The MP-safe wrapper WASP_procInitComm (WASP/common/procInitComm.sqf) is compiled commented-out (initJIPCompatible.sqf:241-245), so the mission relies on these raw calls directly — the standard A2 pattern. See WASP overlay.

Gaps folded into canonical indexes

The External Arma 2 OA reference guide now routes future agents to this page for A3-only command forms such as params, remoteExec, parseSimpleArray, setGroupOwner / groupOwner, multi-index select, filter select, apply, isEqualTo and inline private _var = value. Former apply / isEqualTo snippets in Deep-review findings have been rewritten with OA-safe forEach, isNil, typeName and == patterns.

The two inverse-trap classes are now represented in the compatibility audit and agent-compatibility-audit.json: (a) OA-safe commands commonly mis-assumed A3-only (diag_tickTime, uiSleep — both verified A2-era above), and (b) OA-safe commands removed in A3 (setVehicleInit, processInitCommands). Both classes risk a future agent "fixing" working OA code. Instructions-For-Codex item 48 is canonicalized.

Continue Reading

Canonical usage map: External Arma 2 OA reference guide · Compatibility audit: Arma 2 OA compatibility audit · Networking: Networking and public variables · Findings: Deep-review findings · Code map: SQF code atlas

Method: BIKI command pages carry a per-command version badge; that badge — not the usage examples, which often include later Arma 3 notes — is the authority for OA availability. Forum threads are corroboration only, never the version source of truth. Verified 2026-06-02, lane external-a2-docs-editorial-compression.

Sidebar

Clone this wiki locally