Illegal Commands

Original Commands

These original scripting commands are not usable in CWE. Do not use them in any CWE missions. All of these commands do have a working alternative.

COMMAND: INFO:
SaveGame

Reason not to use:

  • Disabled, does nothing.

Use instead:

  • call loadfile("\CWE_Functions\SaveGame.sqf")
  • call SaveGame

Notes:

  • "call SaveGame" does not work during init.
  • If you can't use "call SaveGame" in the editor, try "call {call SaveGame}" instead. 'call loadfile("\CWE_Functions\SaveGame.sqf")' works always.
RemoveAllWeapons

Reason not to use:

  • Disabled, does nothing.

Use instead:

  • call loadfile("\CWE_Functions\RemoveWeapons.sqf")
  • call RemoveAllWeapons

Notes:

  • "call RemoveAllWeapons" does not work during init.
  • If you can't use "call RemoveAllWeapons" in the editor, try "call {call RemoveAllWeapons}" instead. 'call loadfile("\CWE_Functions\RemoveWeapons.sqf")' works always.
FadeSound

Reason not to use:

  • Does not supply required information to CWE Dynamic Sound Engine

Use instead:

  • [<volume>,<time>] call loadfile("\CWE_Functions\FadeSound.sqf")

Notes:

  • Can be used together with the alternative method (to assure that the change of volume happens, the alternative method is still a bit buggy).
SetRain
SetFog
SetOverCast

Reasons not to use:

  • These do not supply required information to the CWE Weather System
  • Their effect will be overrun by the CWE Weather System

Use instead:

  • [<value>,<time>] call loadfile("\CWE_Functions\SetRain.sqf")
  • [<value>,<time>] call loadfile("\CWE_Functions\SetFog.sqf")
  • [<value>,<time>] call loadfile("\CWE_Functions\SetOverCast.sqf")

Notes:

  • GetRain.sqf, GetFog.sqf and GetOverCast.sqf can be used to check current weather.

Additional notice regarding AddRating: Do not use addrating during init time.


ArmA: Cold War Assault Commands

All ArmA:CWA commands are usable and work properly with the mod, but to retain compatibility with OFP Resistance 1.96, prefer not using them directly, but through CWE functions, which perform a check on the version of the game and proceed accordingly. Here is a list of CWA commands and their OFP compatible CWE alternatives.

COMMAND: ALTERNATIVE:
Find

Syntax:

  • [<array>,<item>] call loadfile("\CWE_Functions\Find.sqf")
    • <array> is the array from which to search.
    • <item> is the item to search.
GetPosASL

Syntax:

  • <object> call loadfile("\CWE_Functions\GetPosASL.sqf")
    • <object> is the unit or an object whose position is to be checked.

Alternate syntax:

  • <object> call gPosASL
    • Doesn't work during init time, can be used when 'CWE_GlobalReady == true'.
GetWorld

Syntax:

  • GetWorld
    • Use as before. During CWE init, the command is replaced by a string containing the island name. During init time the command works normally with CWA, but in OFP 1.96 it only works after init time.

Info:

  • During init time prefer the usage of this command to ensure compatibility with OFP 1.96:
    • call loadfile("\CWE_Functions\GetWorld.sqf")
IsServer

Syntax:

  • call loadfile("\CWE_Functions\IsServer.sqf")

Info:

  • When using OFP 1.96, this function tries to find a game logic named 'CWE_ServerCheck' to check for its locality. It is highly recommended to include a game logic with that name in your OFP 1.96 MP mission.
SetPosASL

Syntax:

  • [<object>,<pos>] call loadfile("\CWE_Functions\SetPosASL.sqf")
    • <object> is the unit or an object whose position is to be checked.
    • <pos> is the 3D position above sea level in which you want to move the unit or an object.

Fwatch Commands

Do not use any of these commands.

COMMAND: INFO:
:file renamemissions

Reason not to use:

  • Not compatible with ColdWarEnhanced.exe's automatic file operations.
  • May result in loss of MP mission files and may create unnecessary copies.
:restart client

Reason not to use:

  • Does not launch CWE correctly.

Use instead:

  • "restart" call loadfile("\CWE_Functions\ExternalCommand.sqf")
:restart server

Reason not to use:

  • Does not launch CWE correctly.

Back to Mission Editing

SJ-Studios - 2009-2016

Contents created for Cold War Enhanced by SJ-Studios is licensed under ARMA PUBLIC LICENSE SHARE ALIKE (APL-SA)

The wiki and the textual content of CWE Wiki is licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International