Skip to content

Expressions listing

Psycho edited this page Mar 30, 2017 · 1 revision

Expressions listing by category

  • Data

    • GetMessagePropertiesCount
    • IsMultipartMessage
    • Message
    • MessageAsJSON
    • MessageAtProperty
    • MessageHasProperty
  • Highscores

    • GetHighscores
  • Ids

    • ConvertDeviceIdToPlayerNumber
    • ConvertPlayerNumberToDeviceId
    • DeviceId
    • GetActivePlayerDeviceIds
    • GetControllerDeviceIds
    • GetMasterControllerDeviceId
  • Persistent data

    • GetPersistentData
  • Plugin

    • IsPluginOffline
  • Profile

    • GetNickname
    • GetProfilePicture
    • GetUID
    • IsPremium

(AirConsole).GetMessagePropertiesCount

Description: Returns an integer corresponding to how many properties were set in the last received message.

(AirConsole).IsMultipartMessage

Description: Returns 1 if the last received message has more than one property set.

(AirConsole).Message

Description: Contains the last received message. Be aware that if the last received message is multipart, this will return a JSON string of the message. I fit contains only one property it returns the property value, whatever the property name is.

(AirConsole).MessageAsJSON

Description: Returns the last received message as a JSON converted C2Dictionnary. Use C2Dictionary.Load() to read the data.

(AirConsole).MessageAtProperty(propertyName)

Description: Returns the value of the specified property in the last received message

Conditions: The message has to have that property set or a warning will be triggered in your console

(AirConsole).MessageHasProperty(propertyName)

Description: Returns 1 if the last received message has the specified property, else 0.

(AirConsole).GetHighscores

Description: Returns a JSON converted C2Dictionnary of the highscores loaded by the last requestHighScores. Use C2Dictionary.Load() to read the data.

Conditions: use in trigger On Receiving HIghscores after using Request Highscores.

(AirConsole).ConvertDeviceIdToPlayerNumber

Description: Returns the player number for a device_id, if the device_id is part of the active players previously set by the screen by using SetActivePlayers.

Conditions: Requires use of Set Active Players first.

(AirConsole).ConvertPlayerNumberToDeviceId

Description: Returns the device_id of a player, if the player is part of the active players previously set by the screen by using SetActivePlayers.

Conditions: Requires use of Set Active Players first.

(AirConsole).DeviceId

Description: Returns the device id that last triggered an event in Construct 2.

(AirConsole).GetActivePlayerDeviceIds

Description: Returns a JSON converted C2Array of device_ids of the active players previously set by the screen by calling setActivePlayers. The first device_id in the array is the first player, the second device_id in the array is the second player etc.

(AirConsole).GetControllerDeviceIds

Description: Returns a JSON converted C2Array of all the device ids that have loaded your game.

(AirConsole).GetMasterControllerDeviceId

Description: Returns the device Id of the master controller. It can be undefined, in that case Construct 2 will return -1.

(AirConsole).GetPersistentData

Description: Returns a JSON string representation of the persistent data loaded by the last requestPersistentData. Use C2Dictionary.Load() to read the data.

(AirConsole).IsPluginOffline

Description: Returns 1 if the plugin loaded as offline, else 0.

(AirConsole).GetNickname(deviceId)

Description: Returns the nickname of the specified device id.

(AirConsole).GetProfilePicture(deviceId)

Description: Returns the profile picture url of the specified device id. It can be null, in which case the default Gravatar icon url will be returned.

(AirConsole).GetUID(deviceId)

Description: Returns the globally unique id of the specified device id.

(AirConsole).IsPremium(deviceId)

Description: Returns 1 if the specified device id is premium else 0.