Script commands list

From Mashinky
Jump to: navigation, search

List of script commands

Scripts commands

Choose

These commands will pick some specific object from the map. The result could be used as input for many other script functions

  • object ChooseIndustry(hash type, object aroundObject, object indexPrefered, float minDistance, float maxDistance, number maxHeightDifference)
  • object ChooseStation(object aroundObject, object indexPrefered, float minDistance, float maxDistance, number maxHeightDifference)
  • object ChooseDepot(object aroundObject, object indexPrefered, float minDistance, float maxDistance, number maxHeightDifference)
  • object ChooseVehicle(hash type, object aroundObject, object indexPrefered, float minDistance, float maxDistance, number maxHeightDifference)

Tests

These functions will test some condition and return the amount or if it is true

Gui

By these functions, you can mainly affect user interface of quests and also define highlighted area on the map where some action may be for free or it just show some predefined space where script can react differently

  • UpdateCaption(string caption)
  • UpdateCaptionFormat(hash textId, string param1, string param2, string param3, string param4, string param5, string param6, string param7, string param8, string param9, string param10, string param11, string param12, string param13, string param14, string param15, string param16)
  • UpdateText(string text)
  • UpdateTextFormat(hash textId, string param1, string param2, string param3, string param4, string param5, string param6, string param7, string param8, string param9, string param10, string param11, string param12, string param13, string param14, string param15, string param16)
  • UpdateOnScreenText(string text)
  • UpdateOnScreenTextFormat(hash textId, string param1, string param2, string param3, string param4, string param5, string param6, string param7, string param8, string param9, string param10, string param11, string param12, string param13, string param14, string param15, string param16)
  • AddButton(string caption, number tag, long image, bool enabled)
  • AddButtonFormat(hash textId, number tag, number image, bool enabled, string param1, string param2, string param3, string param4, string param5, string param6, string param7, string param8, string param9, string param10, string param11, string param12, string param13, string param14, string param15, string param16)
  • RmvButton(number tag)
  • GuiHighlight(string itemName)
  • number GetGuiMode()
  • bool GetGuiChecked(string itemName)
  • string GetGuiTag(string itemName)
  • string GetLockOnObject()
  • string GetLockUsingObject()
  • number GetLockSubIndex()
  • number GetLockCameraIndex()
  • SetNumFreeActions(string actionName, number actionNumber)
  • ClearFreeActionArea()
  • AddFreeActionArea(number left, number top, number right, number bottom)
  • AddFreeActionObject(object objectA, number range)
  • SetVisibleSysButtons(bool visible)

Map

By these functions, you can modify map. There are ways how you can build new industry, modify terrain or even progress to another era on the map.

Tokens

To affect number of tokens, you can use these functions.

Vehicles

Variouse things could be done to one of players vehicles, here you can see the list of related functions

Quests

Also quests itself can do some modifications

Statistics

You can get some statistics about current map, or change the time.

Utils

To create arbitrary create some object reference, you can use one of these functions