SiN Episodes - Tutorial - Secret Area
This tutorial expects you to have this amount of knowledge within the topic to follow along smoothly.
The following tutorial will show you how to create a simple secret area as found throughout Sin Episodes, see List of Secret Areas for more information regarding all of the official secrets hidden in the game and what methods are used to reach them. The most basic secret location setup consist of three main parts (not counting the loot) to make it work: a trigger tied to a trigger_secret that registers the player, an ambient_generic that plays a small tune, and an env_hudhint informing the player visually that a secret has been found.
Creating the entities
Start of by creating a volume with the block creation tool around the area where the player can trigger the secret and at the same time see the loot - using the 'tools/toolstrigger' texture, then select it and either use the + shortcut or click the toEntity button on the new object toolbar to tie it to a trigger_secret entity from the following dropdown menu. This now entity does not need to be named nor have any other of its parameters altered in any way at this point beyond its default values, except if you want to enable it together with the loot by another entity.
Next create a point entity with the entity tool and set its class to an ambient_generic, give it a name like 'secret_sound' and set the name of the soundfile to play upon triggering to 'ambient/ritual_secret2.mp3' or 'secret.found' depending on if either raw or game sounds sound file type is used, though neither should not make any difference in-game. In the flag tab remember to check 'Play Everywhere' and uncheck 'Start Silent', which will make sure the sound is played beyond the local secret's area.
Finally make yet another point entity and make its class an env_hudhint, set the hint text to be 'SE1_Hint_Secret' and a duration of 3 seconds so that it does not play for too long, and make sure to give it a name like 'secret_hudhint'.
At this point all the entities should be setup and there can be drawn connections between them, so open up the properties window for the trigger_secret brush, go to the outputs tab and add the ones below. What this does is when the player touches the trigger's volume, it will play the sound effect and show a hud hint to the player, but only once since this entity is essentially an extended trigger_once.
|My Output||Target Entity||Target Input||Parameter||Delay||Only Once|
You should now have a working secret and all there is left to do is place it somewhere the player might not look for it, like in an allyway or cornerstone of the map that the player might not be going through en route to finish the objective, or maybe even make it available it clear sight but so it instead requires the player to either destroy a set of generators, turn on a hidden button somewhere or stack props to reach it.
The loot of a secret usually either consist of one or more item_crate entities, an item_megahealth, prop_antigen_canister or maybe the dopefish, all depending on the situation for if the player may need that extra sweet supply and how much energy has been put into getting the loot in the first place. If you are not quite sure how you want the player to reach a secret or what you want to provide, experiment with it and on top of that also try to take a look at how it has been done with the official secrets found in the game which might inspire you for how you want it done, good luck!