Arma 3 Scripting

case

  • Arma 3 v0.50
  • First in Armed Assault v1.00

Command · Markdown · JSON · original wiki page

Description

This command is used as a keyword inside a switch structure to define a value case.

Important

This command must be written and used inside a switch construct, never stored in a variable, otherwise its behaviour is not guaranteed - see https://foxhound.international/arma-3-sqf-grammar.html for further explanation.

Syntax

case b

Parameters:

Returns: Switch Type

Examples

Example 1

switch (_condition) do
{
    case 1: { hint "1" };
    case 2: { hint "2" };
    default { hint "default" };
};

See also

Control Structures · switch · default