Scavenger Hunt

World Scavenger Hunt

Space Scavenger Hunt

Add 3D items to each scene

Trigger an action when the last item is collected

Change the branding of the coin

World Scavenger Hunt

A collection of items spread across many spaces in a world. Displayed in the Achievements (Trophy) popup in every space in the world.

This guide describes a step-by-step process of configuring a puzzle hunt experience with puzzle pieces spread between spaces in the same world.

Add 3D items to each scene

  1. Enter the first space in the world
  2. Click the Pencil+ icon in the toolbar
  3. Select Add content

  1. Paste the following URL into the text bar in the top part of the window:

https://cache.learnbrite.com/_assets_/models/puzzle/1.gltf

  1. Click the “Import” button

  1. Click the cog icon next to the new puzzle object

  1. Change the Name to Puzzle1
  2. Enable Cast shadows
  3. Change GLTF color encoding to linear
  4. Enable Force unlit

  1. Paste the following action array into the On Click field:

[{"action":"collectItem","item":"puzzle1","isWorldItem":true},{"action":"playSFX","url":"https://cache.learnbrite.com/_assets_/audio/success_digital1.mp3"},{"action":"displayNotification","message":"You've found a puzzle piece!"},{"action":"fadeObject","direction":"out","objectName":"Puzzle1"}]

  1. Paste the following action array into the On Start field:

[{"action":"setObjectVisible","visible":true,"objectName":"Puzzle1","condition":"!item.puzzle1.collected"},{"action":"setObjectVisible","visible":false,"objectName":"Puzzle1","condition":"item.puzzle1.collected"}]

This will ensure that puzzle pieces that have already been collected won’t appear after entering this space again.

  1. Click the Save item button

More puzzle pieces can be added by following these steps while updating the names of objects, collected Gamification items, and the 3D object URL (https://cache.learnbrite.com/_assets_/models/puzzle/2.gltf, …puzzle/3.gltf and so on)

Extra customization option:

The texture of puzzle pieces can be customized. This is often used to show company logos.

  1. Download the default texture for all puzzle pieces: https://cache.learnbrite.com/_assets_/models/puzzle/Branding.jpg
  2. Edit the texture while keeping its dimensions and save as a .jpg file
  3. Go to https://storage.learnbrite.com/apps/files
  4. Upload the new puzzle texture
  5. Click the globe icon to copy the URL

  1. Go back to the space with puzzles
  2. Click the cog icon next to the puzzle object in editing mode
  3. Paste the following code into the Metadata field

{"materialPropertiesOverrides":[{"materialNames":["Branding"],"overrides":{"map":"https://cache.learnbrite.com/_lb-usr5307373569_/Puzzle_hunt_demo/Branding.jpg"}}]}

Make sure to replace the URL marked in pink with the one copied in step 2.

  1. Click the Save button

Step 3 is the same for all subsequent puzzle pieces, even though they have different 3D models. Different pieces will use different parts of the same texture.

Add a Gamification task

  1. Go to the Worlds dashboard https://app.learnbrite.com/dashboard/worlds
  2. Click the 3 dots in a tile representing your world
  3. Select the Gamification option

  1. Click the Add task button

  1. Add a name
  2. Specify the number of points awarded for completing the task

  1. Add the following conditions to the Completion condition field

item.puzzle1.collected && item.puzzle2.collected && item.puzzle3.collected && item.puzzle4.collected && item.puzzle5.collected

This condition should be modified to include all puzzle items available in your world

  1. Add the following text to the Additional data field

{"global":true}

This ensures that the task will be visible in all spaces in your world

  1. Click the Save task button

  1. I click the Show code button
  2. I copy the shortcode and save it for later steps

  1. Reload the page with a space
  2. Click the trophy icon in the top bar
  3. Your task should now be visible and show how many puzzle pieces have been collected

Add the final puzzle objects

  1. In the top bar area, click the location pin icon (hereinafter: Locations menu)
  2. In the Locations menu, click the location where you want to add the last puzzle piece

Add the empty puzzle mediaboard

  1. Click the Pencil+ icon in the toolbar
  2. Select Add content
  3. Paste the following URL in the text box

https://cache.learnbrite.com/_assets_/clients/hyperspace/images/Puzzle_Pieces_empty.jpg

  1. Click the Import button

  1. In the Import content, click the ok button

  1. Reposition the empty puzzle piece board in the space if needed
  2. Click the cog icon to open the object settings

  1. Change the name

  1. Click the Edit action button next to the On Click field

  1. Paste the following text into the existing conversation node:

Collect the puzzle pieces found in the other locations to complete the puzzle.

  1. Click the Player button
  2. Select the Narrator option
  3. Click the Save button

  1. Click the Edit action button next to the On Start field

  1. Delete the existing conversation node
  2. Click the More… button
  3. Select the Script option

  1. Paste the following code into the User Script field:

if (LB.Actions.getTaskStatus({"shortcode":"broken-bush-8689"})=="complete") {
        LB.Actions.setObjectVisible({
"visible":false, "objectName":"Mediaboard_puzzle_empty"});
}
else {
        LB.Actions.setObjectVisible({
"visible":true, "objectName":"Mediaboard_puzzle_empty"});
}

This will hide the empty mediaboard after entering the space with the Puzzle collection task completed

  1. Click the Add action button
  2. Click the Save button

Add the complete puzzle mediaboard

  1. Click the Pencil+ icon
  2. Click the Add content button
  3. Paste the URL of a complete puzzle texture into the text bar
  4. Click the Import button

  1. Reposition the complete puzzle board to fit the empty board

  1. Click the cog icon next to the complete puzzle board
  2. Change the name

  1. Click the Edit action button next to the On Start field

  1. Delete the existing conversation node
  2. Click the More… button
  3. Select the Script option

  1. Paste the following code into the User Script field:

if (LB.Actions.getTaskStatus({"shortcode":"broken-bush-8689"})=="complete") {
        LB.Actions.setObjectVisible({
"visible":true, "objectName":"Mediaboard_puzzle_complete"});
}
else {
        LB.Actions.setObjectVisible({
"visible":false, "objectName":"Mediaboard_puzzle_complete"});
}

This will hide the complete mediaboard after entering the space with the Puzzle collection task still in progress, and show it when the task is completed

  1. Click the Add action button
  2. Click the Save button

Add the last puzzle piece

  1. Click the Pencil+ icon
  2. Click the Add content button
  3. Paste the URL of the last puzzle piece object into the text bar; in this case it’s

https://cache.learnbrite.com/_assets_/models/puzzle/5.gltf

  1. Click the Import button
  2. Reposition the puzzle piece if necessary
  3. Click the cog icon next to the puzzle piece

  1. Change the name

  1. Click the Edit action button next to the On Start field

  1. Delete the existing conversation node
  2. Click the More… button
  3. Select the Script option

  1. Paste the following code into the User Script field:

if (LB.Actions.getItemStatus({"item":"puzzle1"})=="collected" && LB.Actions.getItemStatus({"item":"puzzle2"})=="collected" && LB.Actions.getItemStatus({"item":"puzzle3"})=="collected" && LB.Actions.getItemStatus({"item":"puzzle4"})=="collected" && LB.Actions.getItemStatus({"item":"puzzle5"})!="collected") {
                   LB.Actions.setObjectVisible({
"visible":true, "objectName":"Puzzle5"});
           }
else {
                   LB.Actions.setObjectVisible({
"visible":false, "objectName":"Puzzle5"});
           }

This will hide the puzzle piece #5 after entering the space without all the other pieces collected, and show it when all other pieces are collected.

Please note that this logic works only if this is the only puzzle piece in this space.

  1. Click the Add action button
  2. Click the Save button

  1. Paste the following action array into the On Click field:

[{"action":"collectItem","item":"puzzle1","isWorldItem":true},{"action":"playSFX","url":"https://cache.learnbrite.com/_assets_/audio/success_digital1.mp3"},{"action":"displayNotification","message":"You've found a puzzle piece!"},{"action":"fadeObject","direction":"out","objectName":"Puzzle5"},{"action":"setObjectVisible", "visible":false, "objectName":"Mediaboard_puzzle_empty"},{"action":"setObjectVisible", "visible":true, "objectName":"Mediaboard_puzzle_complete"}]

  1. Click the Save item button

Space Scavenger Hunt

A collection of items found in one space and displayed in the Achievements (Trophy) popup only when in the space.

Add 3D items to each scene

  1. Click the Pencil+ icon in the toolbar
  2. Select Add content

  1. Type coin in the search field
  2. Click the Filters dropdown
  3. Select LearnBrite
  4. Click the Coin (Brandable) to add it to the space

  1. Name the Coin 3D items, Coin1, Coin2, Coin3
  2. Enable Cast shadows
  3. Change GLTF color encoding to linear

For each Coin item click Edit Action on the on click field

Click More button and select Collect item > Type Coin1 > Save action

Click More button > select Notification > Type You've found a coin! > Style Success > Save action

Click More button > select Play SFX > paste URL https://cache.learnbrite.com/_assets_/audio/success_digital1.mp3 > Save action

Click More button > select Fade object > select Coin1 item > Direction : out > Save action

  1. You may delete the first empty dialog node, it’s not needed
  2. Click the Save button

To ensure the collected coins are shown or hidden on next visit to the space

  1. Paste the following code in the On Start field of each coin item ( replace the 4 references to Coin1 for Coin2 and so on for each coin item’s On Start settings )

[{"action":"setObjectVisible","visible":true,"objectName":"Coin1","condition":"!item.Coin1.collected"},{"action":"setObjectVisible","visible":false,"objectName":"Coin1","condition":"item.Coin1.collected"}]

  1. Click the Save button

Important!

Do not use Clone item to add extra coins. If you do so and change the On Click action it will change the action for all coins rather than just one!

Easy:

  • Create the other coins from scratch via Add content

Advanced:

  • Or carefully clone the item > edit the cloned item’s settings and empty the On Click field of the cloned item and Save, then edit the new coin settings once more and use the On Click > Edit action button to create the 4 actions again (collect item, notification, play SFX & fade object).
  • You’ll also need to change the On Start field to reference the new item’s name eg. Coin2

Create the Gamification Task

  1. Pencil+ icon
  2. Select Gamification

Click the Add task button

Name the task and allocate points

Scroll down to the Other settings panel

For example if I have configured 3 coin items configured in the space

item.Coin1.collected && item.Coin2.collected && item.Coin3.collected

You can extend the condition if you’ve created and configured more coin items (eg. 4 coin items below)

item.Coin1.collected && item.Coin2.collected && item.Coin3.collected && item.Coin4.collected

Click the Save task button

Go back to the 3D space and reload

Important!

You must reload the space to see changes made in the Gamification dashboard

Once at least one task exists the Trophy (Achievements) icon will appear in the top toolbar for participants. Click the Trophy icon to see the tasks and their corresponding status.

As items are collected the progress bar and count will update in the Achievements popup

Trigger an action when the last item is collected

Find the shortcode for the task in the Gamification dashboard

Click More button > select Script > Paste:

if(LB.Actions.getTaskStatus({"shortcode":"your-custom-task-shortcode"})=="complete"){

    // Your custom actions go below

    LB.Actions.displayNotification({message:"You found all the coins!"});

}

Change the branding of the coin

The 3d coin model can be customized with your own texture.

Assuming you’ve added a coin to your space with the following URL

https://cache.learnbrite.com/_assets_/models/coin/coin.gltf then follow these steps:

  1. Prepare the branding image
  1. Download the template file (then right-click this link https://cache.learnbrite.com/_assets_/models/coin/coin.jpg and Save as.. to your computer) and prepare it with your own branding resources.
  2. Export the resulting image as JPG or PNG
  3. Upload the image to Hyperspace Storage (see guide on Storage & Files);
  4. Once done, copy its URL by clicking on the small “globe” icon on the right side of the screen.
  5. Paste the URL you just copied in the following snippet (replace TEXTURE_URL)

{"materialPropertiesOverrides":[{"materialNames":["Branding"],"overrides":{"map":"TEXTURE_URL"}}]}

  1. Update the booth to use the new image
  1. Go to the 3D environment
  2. Enter edit mode
  3. Hover over the booth and click on the cog icon
  4. Add the snippet you completed earlier with the URL of your texture in the metadata field
  5. Click Save item

How useful was this article?

Click on a star to rate it!

We are sorry that this article was not useful for you!

Let us improve this article!

Tell us how we can improve this article?