-
Notifications
You must be signed in to change notification settings - Fork 2
06. Expressions
A lot of expressions to give you access to whatever you need! And if you don't find what you need, add it as a suggestion in our issue tracker!
AdShown() : Returns 1 if the last call to show ads actually showed ads. If ads weren't shown it returns 0
IsAdShowing() : Returns 1 if ads are currently being displayed or 0 if not
MotionData() : Returns the received devices motion data
IsMultipartMessage() : Returns 1 if the last received message has more than 1 property, otherwise returns 0
Message() : Returns the last received message
MessageAsJSON() : Returns the last message as a JSON string
MessageAtProperty(propertyName) : Returns the last message value at specified property
MessageHasProperty(propertyName) : Returns 1 if the last received message has the specified property set, otherwise returns 0
GetHighscores() : Returns a JSON converted C3Dictionary of the last loaded highscores
ConvertDeviceIdToPlayerNumber(deviceId) : Converts the specified deviceId to its server attributed player number
ConvertPlayerNumberToDeviceId(playerNumber) : Converts the specified playerNumber to its server attributed device id
DeviceId() : Returns the device id that last triggered an AirConsole plugin condition
GetActivePlayerDeviceIds() : Returns a JSON converted C3Array of deviceIds of the active player previously set by the screen by calling setActivePlayers. The first deviceId in the array is the first player, the second deviceId in the array is the second player etc etc
GetControllerDeviceIds() : Returns a JSON converted C3Array of all deviceIds that have loaded your game
GetMasterControllerDeviceId() : Returns the deviceId of the master controller
GetMessagePropertiesCount() : Return how many properties the last received message contains
GetPersistentData() : Returns a JSON converted C2Dictionary of the last loaded persistent data
IsPluginOffline() : Returns 1 if the plugin loaded as offline, otherwise 0
GetNickname(deviceId) : Returns the nickname of the specified deviceId
GetProfilePicture(deviceId, imageSize) : Returns the profile picture url of the specified deviceId with the specified imageSize in pixels
GetUID(deviceId) : Returns the UID of the specified deviceId
IsPremium(deviceId) : Returns 1 if the specified deviceId is a premium user, otherwise returns 0
GetServerTime() : Returns the current time of the game server. This allows you to have a synchronized clock. You can send the server time in a message to know exactly at what point something happened on a controller. To use this action you need to enable the 'Synchronize time' property in the plugin properties. Only usable on controllers
IsController() : Returns 1 if the plugin is set as a controller, otherwise 0
GetLanguage() : Return the current IETF language tag of a device, e.g. "en-US"
GetTranslation(stringId, replacementValues) : Returns the formatted stringId with variables replaces with values in replacementValues json string