Example Code: Remove NVGs From Enemies: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Text replacement - "{{Feature | Informative | " to "{{Feature|informative|") |
||
(One intermediate revision by the same user not shown) | |||
Line 15: | Line 15: | ||
{{Feature | Informative | | {{Feature | Informative | | ||
* [[opfor]] has been introduced in {{GVI|arma3|0.50}} | * [[opfor]] has been introduced in {{GVI|arma3|0.50}} | ||
* | * <sqf inline>_array select _code</sqf> has been introduced in {{GVI|arma3|1.56}} | ||
}} | }} | ||
Line 62: | Line 62: | ||
{{ArgTitle|2|{{ofp}}|{{GVI|ofp|1.00}}}} | {{ArgTitle|2|{{ofp}}|{{GVI|ofp|1.00}}}} | ||
{{Feature | | {{Feature|informative|This is an [[SQS Syntax]] example.}} | ||
<sqs> | <sqs> | ||
; remove its NVG for each provided enemy units | ; remove its NVG for each provided enemy units |
Latest revision as of 21:42, 16 May 2024
Arma 3
Arma 3
Arma 2
private "_enemySide"; // private definition of the _enemySide variable
_enemySide = east; // value attribution to _enemySide
{
if (side _x == _enemySide) then // if the unit is on the _enemySide, process the next step
{
_x removeWeapon "NVGoggles"; // removal of the enemy unit's NVG
}
} forEach allUnits; // going through -all- units
private "_enemySide"; // private definition of the _enemySide variable
_enemySide = east; // value attribution to _enemySide
{
if (side _x == _enemySide) then // if the unit is on the _enemySide, process the next step
{
_x removeWeapon "NVGoggles"; // removal of the enemy unit's NVG
}
} forEach _unitsArray; // going through provided units - allUnits has been introduced in Arma 2
Operation Flashpoint
; remove its NVG for each provided enemy units
"_x removeWeapon ""NVGoggles""" forEach _enemyUnitsArray