Skip to content

Component: Flags

Timi007 edited this page Feb 8, 2024 · 7 revisions

General information

Author: Timi007, Dan
Description: Flags with various colors which can be placed or carried by players.

Requirements

  • Main
  • ACE (ace_common, ace_interact_menu, ace_interaction)

CBA Settings/Keybinding Options

  • Allow placing flags [live-updating]
  • Allow carrying flags [live-updating]

Classnames

  • mts_flags_white
  • mts_flags_red
  • mts_flags_blue
  • mts_flags_green
  • mts_flags_yellow
  • mts_flags_orange
  • mts_flags_purple
  • mts_flags_black

Adding custom flag

Create an addon. Add a your flag item class to CfgWeapons:

class CfgWeapons
{
    class mts_flags_white;
    class TAG_my_flag: mts_flags_white {
        author = "Me";
        displayName = "Flag (Mine)"; // Item/Flag name
        picture = "\addon_prefix\pictures\my_flag_inventory_pic.paa"; // Path to the picture for the inventory item
        mts_flags_texture = "\addon_prefix\flags\my_flag.paa"; // Path to the flag texture
        mts_flags_actionIconPlace = "\addon_prefix\icons\my_flag_place_icon.paa"; // Path to the icon for the place action. Do not overwrite for default white icon (inherited by mts_flags_white)
        mts_flags_actionIconCarry="\addon_prefix\pictures\my_flag_carry_icon.paa"; // Path to the icon for the carry action. Do not overwrite for default white icon (inherited by mts_flags_white)
    };
};

Note

The item does not need to inherit mts_flags_white. In this example we did it out of convenience.

Clone this wiki locally