Index    EarthC language


Class Members

possible members types:

int (integer 32-bits signed)
enum (a set of strings)
unit
unitex (usually used in mission class)
punit (used only in platoon)
player
platoon

You can also use other classes but you never get a pointer to the object of this class so they are useless as members
aircraft
builder
carrier
civil
harvester
repairer
sapper
supplier
tank
campaign
mission

Enums declarations:

enum MemberIdentifier
{
    "string0",
    "string1",
multi:
    "stringmulti"
}

Variable declared as enum behaves like intiger but can additionaly be attached to Command (see Commands) and create multistate command button.

examples:

int m_nk;
unit m_uUnit;
enum lights
{
    "Lights AUTO",
    "Lights ON",
    "Lights OFF",
multi:
    "Lights Mode"
}