Coded Event

From Tygron Support wiki
Jump to navigation Jump to search

A Coded Event is a datarecord that stores a Server or Client Event type with accompanying parameters.

Content

A Coded event consists of a unique ID, generated by the server, and an array of Objects. The array of Objects must always begin with an array of two Strings, containing the type of the event, followed by the name of the event. The other contents of the Object array are the required parameters of the event, as described on the Api Session Endpoints pages.

As can be seen in the example below, Item ID are currently stored as an Object, with a @type parameter set to ItemID, the actual id and a maplink.

An example of an Coded Event that adds the Glass Offices Function to an Action Menu:

{ "id" : 0, 
  "parameters" : [ 
      [ "LogicEventType", "ACTION_MENU_SET_FUNCTION_AVAILABLE" ], 
      { "@type" : "ItemID", "id" : 18, "mapLink" : "ACTION_MENUS" }, 
      { "@type" : "ItemID", "id" : 653, "mapLink" : "FUNCTIONS" }, 
      true 
    ] 
}