Awarding trophies

From Whirled Club Wiki
Revision as of 00:18, 5 September 2018 by Whirled vox (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This tutorial will guide you through the process of awarding and activating trophies for your game.

Note: Once you add a trophy to the Trophy Sources tab in the game editor, you cannot delete it.

Coding the Trophies

In order to award trophies, you will first need to make the appropriate Trophy award calls in your code. In this example, we are awarding 3 trophies. Of course, in your code, you would be awarding trophies as appropriate and most likely not all together.

<actionscript> //Where _control is an instace of the GameControl Object //And the string argument (i.e. "bronze") is the identifier for the trophy and not the name.

_control.player.awardTrophy("bronze")

_control.player.awardTrophy("silver")

_control.player.awardTrophy("gold") </actionscript>

Uploading the Trophies

After you have listed your game with the trophy calls, you should then create your trophies.

  1. Choose Games &rarr; My Games to see the Games you own.
  2. Click the Edit link under the name of the game you want to make a trophy for.
  3. Select the "Trophy Sources" tab.
  4. Click on the "Create" button to get the trophy source creation interface.
    Trophy source interface.
    1. Click on the Name field and enter a name for your trophy. This is the name that is displayed under the trophy image on a player's trophy page.
    2. Click on the Identifier field and enter an identifier for your trophy. This string is used to identify this trophy in your game code. For the example code shown above, the trophy source identifiers are bronze, silver, and gold.
    3. Click on the Order field and enter a number. This number will be used to sort your trophies into a particular order on your game's detail page, lowest to highest.
    4. Check Secret if you wish for the description the trophy to not be shown until the player has earned the trophy themself.
    5. Click Upload a new file in Trophy Image and find the image file for your trophy (png, jpg or gif; max. 60x60). This is the image that will be seen on the player's trophy page when they win it.
    6. Click on the Description field and enter a description of your trophy. This is only required if you plan to sell it in the shop.
    7. Confirm that you own the copyrights to the item or have authorization to upload it.
  5. You can then click on Save to add your trophy source to the Trophy Sources tab.

Once all the desired trophies have been created, the trophies should be shown on the Trophy Sources tab. The trophies are not yet active at this point.

Games-Edit Game-Trophy Sources-example.png

Activating the Trophies

To activate the trophies, you will need to publish them. For each trophy source, click to "list" the trophy so it is added to the Shop. The trophies will not be visible items in the Shop.

If completed successfully, the trophies will be accessible to the game. Your public game information page will be similar to this:

Games-trophies example.png

Please Note: Once a player has earned a trophy for their profile page, it cannot be removed. Furthermore, the artwork for the trophy on their profile page will not change even if the source artwork for the trophy is updated at a later date. Make sure you are comfortable with the artwork and the conditions for earning the trophy before activating them.

Testing the Trophies

That's it! You are done. Whirled will take care of automatically incorporating your trophy artwork into your game wherever you have called awardTrophy(). Once you have fully incorporated trophies into your game. Please play your game and make sure the trophies are being awarded at the correct time.

See Also