AirConsole - Little expression guide

1

Stats

1,311 visits, 1,642 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

AirConsole plugin version 2

Intro

Welcome to this new tutorial about the AirConsole plugin version 2.

You will learn about the plugin's expressions and their uses

What's needed

- Construct2 obviously

- The AirConsole plugin version 1.7.0.6

- - Official repo: https://github.com/AirConsole/airconsole-construct2

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

Conditions:

(AirConsole).IsMultipartMessage

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

Conditions:

(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.

Conditions:

(AirConsole).MessageAsJSON

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

Conditions:

(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

Conditions:

(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

Conditions:

(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.

Conditions:

(AirConsole).GetControllerDeviceIds

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

Conditions:

(AirConsole).GetMasterControllerDeviceId

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

Conditions:

(AirConsole).GetPersistentData

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

Conditions:

(AirConsole).IsPluginOffline

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

Conditions:

(AirConsole).GetNickname(deviceId)

Description: Returns the nickname of the specified device id

Conditions:

(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

Conditions:

(AirConsole).GetUID(deviceId)

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

Conditions:

(AirConsole).IsPremium(deviceId)

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

Conditions:

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!