Description
Executes code. Used as part of a construct, such as while, with, for and switch. The code is always executed in missionNamespace unless do is used with with as an argument.
Syntax
construct do code
Parameters:
construct: While Type (while), With Type (with), For Type (for), Switch Type (switch)code: Code
Returns: Anything
Examples
Example 1
while { b > a } do
{
a = a + 1;
};
Example 2
with uiNamespace do
{
MyUIVar = MyUIVar + 5;
};
Example 3
for "_i" from 1 to 10 do
{
systemChat str _i;
sleep 0.5;
};
Example 4
switch (50) do
{
case 25: { hint "25" };
case 50: { hint "50" }; // hints "50"
case 75: { hint "75" };
default { hint "nope" };
};