Arma 3 Scripting

UserActions

Topic · Markdown · JSON · original wiki page

Defines an action to be associated with the current object class. Commonly used for operating doors on vehicles.

Class Properties

Examples

Arma 3 example

class CfgVehicles
{
    class Civilian;

    class Civilian_F : Civilian
    {
        class UserActions
        {
            class GetInformation
            {
                displayName = "Get Information";
                displayNameDefault = "<img image='\a3\missions_f_oldman\data\img\holdactions\holdAction_talk_ca.paa'/>";
                priority = 10;
                radius = 10; // a too small radius might cause the action to not be visible
                position = "camera";
                showWindow = 0;
                hideOnUse = 1;
                onlyForPlayer = 0;
                shortcut = "";
                condition = "alive this && !isPlayer this"; // only show if the unit is alive and is not a player
                statement = "if (selectRandom [true, false]) then { hint 'I do not have information for you!' } else { hint 'I tell you everything I know!' };";
            };
        };
    };
};

See Also