Hello and welcome to THS, a Treasure Hunt System for Crayta, made originally in 3 days for the Treasure Hunt Build Jam of June 2022.
THS will allow you to easily add a treasure hunt in your game. Drop the THS template into your world, place locators where you want treasure to spawn, then create your treasure templates and your game is ready to go!
THS will take care of spawning your treasures, along with a trigger so that players can claim your treasures by colliding with it and an optional sound that can serve as a clue to the treasure’s position. THS will track how many treasure each player has found, and when all treasures have been found (or when time is up - you can also set a time limit, see below) it will end the treasure hunt and start a new one! Each treasure hunt will be different because each treasure will be assigned a random position locator each time!
Alternatively, search for “THS Treasure Hunt System Blueprint” if you prefer to start from a clean blueprint!
Step 1: Drop a THS_Main template into your world
Step 2: Drop a THS_User template as a child of your User template
Step 3: Select your THS_Main and set up all the options or leave them by default
Step 4: Create positions in the Positions locator, or use the default ones
Step 5: Create treasures by duplicating the existing ones, or keep the example ones
Step 6: Start preview!
The “Positions” locator contains all the possible positions where you want your treasures to spawn. Simply add as many locators as you need and place them in your world. You can also give them a telling name like in the screenshot above, but this is not necessary.
The “Treasure Templates” locator contains all the treasure templates that you want to spawn in your treasure hunt. If you want your treasure to emit a sound as a clue to its position, simply place a sound as a child of the template and make sure that “Active” is unchecked.
Select the root locator of THS:
TimeLimitedlet’s you turn the treasure hunt into a timed one. A countdown will appear on screen and the hunt will end when time is up. If left unchecked, the hunt will only end when all treasures have been found.
TimeLimitlet’s you define how much time the timed treasure hunt will last, in seconds.
RotateObjectswill make your treasures slowly rotate so that they will look cool and attract the players eyes!
LobbyTimeDurationlet’s you define how much time to wait before starting a new treasure hunt.
RespawnPlayerslet’s you decide if THS should take care of respawning all the players when a new treasure hunt starts or when a treasure hunt has ended. If left unchecked, you can use the events that THS broadcasts(see below) to apply your own logic.
RespawnLocatoris the locator that will be used as destination if
RespawnPlayersis checked. This must be a locator.
PlayerTemplateis the template that will be used to respawn players if
TreasureFoundSoundis the sound asset that will be played when a player has found a treasure.
TreasureHuntStartSoundis the sound that will be played when a new treasure hunt starts.
TreasureHuntEndSoundis the sound that will be played when a treasure hunt has ended.
TreasureMeshTemplateshould contain the template that you want to spawn. This template should contain all the geometry and effects that you want for your treasure. Make it look cool!
ScreenNameis the name of the treasure as you want it to appear on screen. Give them cool names!
TriggerSizelet’s you adjust the size of the trigger that will be spawned at the exact same position as your template. If your template is exceptionally big, or small, then tweak this option!
- If you want your treasure to emit a sound, make it a child of the template locator by dropping it under it, like in the screenshot above. Make sure the “Active” parameter of the sound is unchecked so that your sound will only be heard when a treasure hunt is ongoing. Also, make sure the sound you choose is a looping one, otherwise your sound will hardly be heard. Then you should also tweak the ranges parameters of your sound so that it could be heard from farther away.
Advanced users can take advantage of the following events which are broadcast server wide using
THS_HuntStartedis broadcast when a treasure hunt just started.
THS_HuntEndedis broadcast when a treasure hunt just ended.
THS_TreasureFoundis broadcast when a treasure has been found. The
userwho found the treasure is provided as well as the name of the treasure.
- Be creative and place you treasures in places that are difficult to access, for example behind an obstacle course full of traps, or only accessible through a vicious jump puzzle!
- Each round, the treasures are randomly placed. You can create more treasure positions than you have treasures so that some of the possible positions will be empty but would still force players to check that place. Want to make them climb a torturous tower only for them to find that there is no treasure there?
- Alternatively, you can create less positions than you have treasures so that each round, different treasures will be spawned and some won’t be spawned at all, so that you can have some kind of treasures rotation.
- Take advantage of the sound clue that treasures can emit so that players will be able to use sound in order to navigate through your world. Tweak the ranges so that the sounds will be heard from farther away.
- If you are an advanced user, you can take advantage of the events that are broadcast by THS to, for example, give certain powers and abilities to your players depending on the treasure they find! What if a treasure is needed in order to access another treasure?!
- Feel free to change the UI appearance to fit your style! All UI widgets(4) reside in the root locator of THS_Main.
The following list is prone to change:
- Modulate the pitch of sounds so that the further a player is from a treasure, the lower the pitch is.
- Better looking UI and better general feedback.
- Persistent player scores.
Don’t hesitate to post here for suggestions, bug reports or any comments you might have!