Index    EarthC language


Commands

Command structure 

command CommandName(parameters) [button EnumName|"ButtonName"] [description "DescriptionText"] [priority number] [hotkey] [hidden]

{

    [...]

}

CommandName - see CommandObject 

priority - controls order of buttons in game interface (0-255)
hotkey - use hotkey for this button
hidden - don't display button on interface

examples

command Attack(unit uTarget) button "Attack"
{
}

//-----------------------------------------------------------

 

enum m_eLights
{
"Lights AUTO",
"Lights ON",
"Lights OFF",
multi:
"Lights Mode"
}

[...]

//depend on value of m_eLight one of Lights auto(0)/on(1)/off(2) or mode(enything else then 0,1 or 2) will be displayed on game pannel.

command SetLights(int nMode) button m_eLights priority 204
{
}