The following additions to the basic setup will allow us to add messaging functionality, control the game from the back-end with triggers, do A/B Testing, and calculate offline replenishing consumables.
Estimated time to implement: ~2 minutes.
Go to the Attributes Tab of your project. We are going to add four more game level Attributes which we will use in-game for various actions and functions:
- AF_Message of type text
- AF_Triggers of type text
- AF_ABStatus of type text
- AF_SecondsAfterLaunch of type text
Next we are going to open our AF_Start actor and add a new self attribute:
- thirdcontact of type integer
Now find your previously created Rule (B) and drag a new Network Get Table From URL behavior into this rule, after the existing behaviors.
On the URL field, open the expression editor and enter the game level attribute game.get_setup_URL, then follow this with two full-stops (periods), then add the attribute game.AF_UserID.
Add the table game.T_Analytics to the Table field, and the attribute self.thirdcontact to the Callback Attribute field.
Next we are going to add a Rule (C) after Rule (B).
Create a group for convenience and add the four Change Attribure behaviors into this group. Populate each with the values as shown below, making sure you use the expression editor to select the attributes and values.
Please note that the tableCellValue column for the game.AF_SecondsAfterLaunch attribute is 5.
Your project is now ready to receive messages, receive triggers, capable of handeling A/B test-scenarios and accurately calculate consumables.