(info) Other great resources: Official JS API docs, Scripting Forum

User Interface

 

  • _() localiseUsed for string localisation (translation in to other languages)...
  • console()Outputs text to the player console associated with the script.
  • enumSelected()Get a list of all objects selected by the the game host...
  • Mini Map and Design ModeEnable or disable the mini map and design mode depending on the presence of a HQ.
    • setMiniMap()Display or hide the localhost human player's radar mini-map...
    • setDesign()Enable or disable the design tool...
  • playSound()Plays a sound, optionally displaying a beacon on the map and mini map.
  • audioAlert(filename,pos,despam)Throttled alternative for playSound().
  • setTutorialMode()Toggles "tutorial mode" in a single-player game...
  • addReticuleButton()Enable a reticule button...
  • removeReticuleButton()Disable a reticule button...
  • Reticule buttonsThese constants are used by addReticuleButton() and removeReticuleButton().
    • BUILDUsed to show or hide the "Build" (hammer) reticule button.
    • CANCELUsed to show or hide the "Cancel" (central) reticule button.
    • COMMANDUsed to show or hide the "Command" (star) reticule button.
    • DESIGNUsed to show or hide the "Design" (blue components) reticule button.
    • INTELMAPUsed to show or hide the "Intelligence" (earth map) reticule button.
    • MANUFACTUREUsed to show or hide the "Maufacture" (factory) reticule button.
    • OPTIONSThis constant is deprecated, use COMMAND instead.
    • RESEARCHUsed to show or hide the "Research" (green circuit board) reticule button.
  • Camera