TTP Map Tutorial: Puzzle Items

From Serious Sam Wiki
Jump to: navigation, search

In this part of the tutorial we will

  • add puzzle elements to the puzzle area.

Adding Puzzle Items

Procedure

Generally speaking, all puzzle items are added to a world in the same way:

1. Switch to the EntityList panel (Alt+3).
2. Locate the desired puzzle item and drag it to the desired position in the viewport by clicking/holding LMB.png.

Info 16x16.png Note: If you have problems with locating things in entity list, you can switch it to show everything sorted by alphabet order, not separated by different folders. To do that, press Ctrl+M (or click the icon at the top-left corner of the entity list).

3. Switch to the Entity panel (Alt+1).
4. Add the correct puzzle item resource file to the properties.
5. In some cases further property settings are required.

In many cases, executing above step 2 will lead to warnings and error messages in the Output group. That is due to the fact that puzzle items require resource files that can only be defined after adding the item to the world. So don't worry about these messages. If the blinking in the Status bar group at the bottom of the editor gets too annoying, just click LMB.png on it.

Info 16x16.png Note: Once you have added a resource file to a puzzle item entity for the first time, you can easily add it to future puzzle items with the 'Recent files' dropdown menu of the resource control. That saves a lot of browsing.

Entities and Resources
Item Name in EntityList panel Mandatory Property Resource files
Jammer Jammer Item params Content/Talos/Databases/Items/Misc/Jammer.ep
Button Pressure Plate Params Content/Talos/Databases/Items/Misc/PressurePlate.ep
Plasma Door Plasma wall Params Content/Talos/Databases/Items/Misc/PlasmaDoor.rsc
Connector Connector Item params Content/Talos/Databases/Items/Misc/EnergyRod.ep
Content/Talos/Databases/Items/Misc/EnergyRodStationary.ep
Energy Emitter Transponder Params Content/Talos/Databases/Items/Misc/EnergyEmitter_Blue.ep
Content/Talos/Databases/Items/Misc/EnergyEmitter_Red.ep
Energy Receiver Transponder Params Content/Talos/Databases/Items/Misc/EnergyReceiver_Blue.ep
Content/Talos/Databases/Items/Misc/EnergyReceiver_Red.ep
Cube / Hexahedron Carriable Item Item params Content/Talos/Databases/Items/Misc/Cube.ep
Fan Fan Params Content/Talos/Databases/Items/Misc/Fan.ep
Content/Talos/Databases/Items/Misc/FanStationary.ep
Fan Blades Fan Item Item params Content/Talos/Databases/Items/Misc/FanItem.ep
Time Recorder Time switch Params Content/Talos/Databases/Items/Misc/TimeRecorder.ep
Shield / Platform Platform Item Item params Content/Talos/Databases/Items/Misc/NexusShield.ep
Axe Axe Item params Content/Talos/Databases/Items/Misc/NexusAxe.ep
Switch Switch Params Content/Talos/Databases/Items/Misc/Switch.ep
Ladder Ladder Ladder params Content/Talos/Databases/Tools/Ladder_Short_ClimbToLedge.ep
Content/Talos/Databases/Tools/Ladder_Short_JumpOverLedge.ep
Mine Mine puppet Puppet params Content/Talos/Databases/Puppets/Mine.ep
Content/Talos/Databases/Puppets/Enemies/MinePassive.ep
Turret Auto turret Puppet params Content/Talos/Databases/Puppets/AutoTurret.ep

Available Mechanics

Mechanics are puzzle items that are unlocked step by step in the standard campaign: connector, cube, fan, time switch, and ahield.

When adding items that belong to puzzle mechanics it is necessary to make them available for the player because every world starts with all puzzle mechanics locked. To unlock puzzle mechanics for the player from the get go:

1. Add a 'Script' entity from the EntityList panel to the world. Position does not matter but somewhere in sight would be advisable.
2. Double-click LMB.png on the Script in the viewport to activate the script editor.
3. Copy the following code into the script editor:
-- talosProgress : CTalosProgress
local talosProgress = nexGetTalosProgress(worldInfo)
talosProgress:AssureUnlockedMechanic("MechanicCube")
talosProgress:AssureUnlockedMechanic("MechanicRods")
talosProgress:AssureUnlockedMechanic("MechanicFan")
talosProgress:AssureUnlockedMechanic("MechanicTime")
talosProgress:AssureUnlockedMechanic("MechanicShield")
prjOnMechanicLockingChanged(worldInfo)
4. Switch to the Entity panel.
5. Click with LMB.png in the value field of the 'Script' line and select 'Save as...' to save the local resource we just created.
6. In the dialog browse to the folder you created for this tutorial project and save the file. Suggested name: UnlockScript.

Working with scripts will not be explained in more detail but part 8 of this tutorial also contains scripts.

Jammer

Screenshot of Jammer.

TTP Tutorial Jammer.png

Content/Talos/Databases/Items/Misc/Jammer.ep

A Jammer does not need any other property settings than the above resource file. In our tutorial map there is one Jammer positioned at (-16, 0, 16).

Pressure Plate

Screenshot of Pressure Plate.

TTP Tutorial PressurePlate.png

Content/Talos/Databases/Items/Misc/PressurePlate.ep

A Pressure plate does not need any other property settings than the above resource file. In our tutorial map there is one Pressure plate positioned at (-10, 0, 16).

Plasma Wall

Screenshot of Plasma wall.

TTP Tutorial PlasmaWall.png

Content/Talos/Databases/Items/Misc/PlasmaDoor.rsc

Adding Plasma walls to the world always causes an error message because by default, the 'Curvature' property is set to 15 although Plasma walls must have a curvature of 0. So this property has to be corrected manually.

Positioning

The emitters of a Plasma wall are usually located on column models. After adding the Plasma wall with the correct resource file you can position it the following way

Plasma wall aligning.
1. Locate the emitter that has the green zylinder around it and make sure it is selected. That green zylinder is an editor model that is supposed to help with editing because you can
  • see the entity better and
  • select it by clicking on the editor model instead of having to hit the emitter model.
Unfortunately, the editor model also hinders visibility of the model itself. So you may want to deactivate the editor model which is done with the dropdown menu in the top right corner of the viewport. Just uncheck 'Editor models'. Do not forget to switch it back on at a later stage because some entities do not have their own model.
2. Hold Alt to activate the drag/align tool.
3. Find the snap point at the center of the bottom plane. Since that one is also the origin of the Plasma wall emitter it appears in a star-like shape.
4. Drag the snap point to the snap point at the center of the bottom edge of a column tile.

In our map there are four Plasma walls located at

  • (-12, 0, 12.375),
  • (-12, 0, -19.625),
  • (-11.625, 0, 4),
  • (12, 0, 12.375).

Rotate them with Tab ↹ to the approriate orientation.

Property settings

Screenshot of Plasma wall settings.

TTP Tutorial PlasmaWall Settings.png

If you've already added all Plasma walls you can edit the following settings (except Activators) in one go when you select all of them. Otherwise edit the properties of the first Plasma wall only and copy/paste it to save time.

Width
Set this to 7.25 to fit each Plasma wall exactly between two colums in our puzzle area.
Height
Set this to 3 because the inner architecture of the puzzle area is 3m high.
Auto activate
Check the checkmark box to have the Plasma wall activated by default.
Activators
This property is used to activate/deactivate a Plasma wall. We want the Plasma wall located next to the pressure plate to be controlled by the pressure plate:
  • Expand the 'Activators' property.
  • Highlight the 'Activator 1' line by clicking LMB.png in the name field.
  • Hold Ctrl+Alt and click with LMB.png on the Pressure plate in the viewport.
The Pressure plate is now added as an activator of the Plasma wall.

Connector

Screenshot of Connector.

TTP Tutorial Connector.png

Content/Talos/Databases/Items/Misc/EnergyRod.ep

Content/Talos/Databases/Items/Misc/EnergyRodStationary.ep

A Connector does not need any other property settings than one of the above resource files. In our case we need Connectors that the player can pick up so use 'EnergyRod.ep'. In our tutorial map there are two Connectors positioned at

  • (-16, 0, -16),
  • (-8, 0, 0).

Transponder

Screenshot of energy emitter.

TTP Tutorial EnergyEmitter.png

Content/Talos/Databases/Items/Misc/EnergyEmitter_Blue.ep

Content/Talos/Databases/Items/Misc/EnergyEmitter_Red.ep

Content/Talos/Databases/Items/Misc/EnergyReceiver_Blue.ep

Content/Talos/Databases/Items/Misc/EnergyReceiver_Red.ep

A Transponder does not need any other property settings than one of the above resource files.

A fast way to position Transponders is to

  • press six times to rotate the model so that it can go on a wall,
  • use the drag/align tool to properly align it with a wall, and
  • adjust the remaining position settings to move the Transponder to the right spot on the wall.

Keep in mind that receiver Transponders should be located close to the puzzle element they activate/deactivate if you don't want to use wires to indicate what is controlled.

In our case we need one red energy emitter positioned at

  • (-4.25, 1.5, -8),

and two red energy receivers positioned at

  • (-8, 1.5, -19.75),
  • (-11.75, 1.5, 0).

Finally, we need to edit the 'Activators' of the Plasma walls that are next to each of the energy receivers. It works the same way as described above in the Plasma wall section. Just assign one energy receiver to each of the Plasma walls.

Cube

Screenshot of cube.

TTP Tutorial Cube.png

Content/Talos/Databases/Items/Misc/Cube.ep

A Cube does not need any other property settings than the above resource file. In our tutorial map there is one Cube positioned at (8, 0, 8).

Fan

Screenshot of fan.

TTP Tutorial Fan.png

Content/Talos/Databases/Items/Misc/Fan.ep

Content/Talos/Databases/Items/Misc/FanStationary.ep

Add a Fan at position (0, 0, -18). We don't want the player to be able to take of the fan blades so set 'Params' to 'FanStationary.ep'. There are multiple settings that influence the look and the behaviour of a Fan:

Pitch angle
The first question is where the Fan is supposed to point. In our case, we want an angle of 45°. As soon as pitch angle is edited to a number other than 0, the model of the Fan will change to a platform fan. Note that the Fan points towards a wall now so rotate it twice with Tab ↹.
Activation range
This property defines the length of the cubic range that the player/an object has to enter in order to be catapulted by the Fan. It is displayed in the viewport as an orange box emanating from the Fan. Set the value to 2.
Speed
For the speed setting it is advisable to activate 'Selection ranges' in the second dropdown menu in the top left corner of the viewport. This displays the path of catapulted players/objects in form of a red arrow. Set speed to 30 so that the arrow points next to the entrance.

Time Switch

Screenshot of time switch.

TTP Tutorial TimeSwitch.png

Content/Talos/Databases/Items/Misc/TimeRecordere.ep

A Time switch does not need any other property settings than the above resource file. In our tutorial map there is one Time switch positioned at (0, 0, 5).

Ladder

Screenshot of ladder.

TTP Tutorial Ladder.png

Content/Talos/Databases/Tools/Ladder_Short_ClimbToLedge.ep

Content/Talos/Databases/Tools/Ladder_Short_JumpOverLedge.ep

A Ladder does not need any other property settings than the above resource file. In our tutorial map there is one jump-over-ledge Ladder positioned at (-16, 3, ~4.2).

The approximate z position value is due the fact that the easiest way to position a Ladder is by using the drag/align tool. On the Ladder use the snap point at the center of the top edge that is supposed to be attached to the wall. On the wall use the the snap point in the center of the top plane.

Mine Puppet

Screenshot of Mine on Path marker.

TTP Tutorial Mine PathMarker.png

Content/Talos/Databases/Puppets/Mine.ep

Content/Talos/Databases/Puppets/Enemies/MinePassive.ep

A static Mine does not need any other settings than one of the above resource files.

However, we want the Mine to move around which is accomplished the following way:

1. Add a Path marker from the EntityList panel to the world.
2. Position the Path marker where you want the Mine to start its way. In our case that is at (8, 0, 6).
3. Copy and paste the Path marker to the position you want the Mine to move to. In our case that is at (8, 0, -8).
4. Select the first Path marker and, in the Entity panel, click LMB.png in the name field of the 'Next marker' line to highlight it.
5. Hold Ctrl+Alt and click LMB.png on the second Path marker. The connection that is created like this can be examined in the viewport by actvating 'Selection ranges' in the second dropdown menu in the top left corner of the viewport.
6. Add a Mine to the world and use resource 'Mine.ep'. The position is irrelevant. If the spheres displayed in the viewport around the Mine model disturb you deactivate 'Selection ranges' (see above).
7. In the Entity panel, click LMB.png in the name field of the 'First path marker' line to highlight it.
8. Hold Ctrl+Alt and click LMB.png on the first Path marker. The mine is automatically moved to the position of the selected Path marker.

More complex ways for moving Mines are created by adding further Path markers. If you want the Mine to oscillate between two end points (like in our case) just leave the 'Next marker' property of the last Path marker empty. If you want a Mine to move in circles, point the 'Next marker' property of the last Path marker to the first Path marker (or any other path marker on the way).

Auto Turret

Screenshot of Auto turret.

TTP Tutorial AutoTurret.png

Content/Talos/Databases/Puppets/AutoTurret.ep

Adding an Auto turret to the world always causes an error message because by default, the 'Use old pitch calculation method' property is checked. This property must be unchecked manually.

In our map we need the Auto turret at position (16, 3.25, 19.75). Rotate it to the correct orientation. Apart from these settings we want to manipulate the target range. So activate 'Selection ranges' in the viewport. The yellow part of the target range indicates a warning area where the turret beeps but doesn't shoot yet. The red part indicates the firing area.

Screenshot of Auto turret settings.

TTP Tutorial AutoTurret Settings.png
Heading 0
Set this to -10. It defines the left end of the target range.
Heading 1
Set this to 10. It defines the right end of the target range.
Min range
Leave this as is. It defines the space underneath the auto turret that is outside the target range.
Fire range
Set this to 32. It defines the length of the target range.
Kill range
Set this to 25. This defines the part of the target range in which, once entered, the player is killed without a chance of escape. Kill range is displayed in the viewport in dark red.
Floor height offset
Set this to -2.5. This defines the bottom plane of the target range.

Shield, Axe & Switch

These three items are not used in the tutorial map. None of them require anything but the correct resource file setting (see table above).

Extra: Probe Light

Screenshot of Probe light.

TTP Tutorial ProbeLight.png

You may have noticed that the added puzzle items are badly lit: the shadow sides are very dark. That is because they are not part of GI. That can be remedied with a Probe light:

1. Add a 'Probe light' from the EntityList panel to the world.
2. Position it at (0, 2, 0).
3. Switch to the Entity panel and set the 'Size' values to
  • x = 64,
  • y = 10,
  • z = 64.
4. Press ⇧ Shift+B to bake the probe light.

All puzzle items will now appear brighter on their shadow side. A Probe light calculates a light map of its surroundings and applies that to all entities within its effect range. Note that we adjusted the effect range to well include the entire puzzle area. If you want the effect to be weaker/stronger you can decrease/increase the 'Ambient modulator' property under 'Probe light'.

Extra: Post Processing Effect

Screenshot of Post processing effect.

TTP Tutorial PostProcessingEffect.png

There's only one thing left now: the white light emanating from an energy emitter through a Connector to an energy receiver appears pale. To add bloom we need a Post processing effect:

1. Add a 'Post processing effect' from the EntityList panel to the world.
2. Position it at (0, 3, 0).
3. Switch to the Entity panel and assign
Content/Talos/Presets/PostProcessing/Default.rsc
to the 'Post processing preset' property.

The Default post processing preset is used in every level of the standard campaign with an infinite range. Among other things it adds bloom to the energy light.

Position, Orientation and Resource File Data

Here are position, orientation and resource file data of all entities added in this article:

Puzzle Items
Entity X Y Z B P H Resource file
Jammer -16 0 16 0 0 0 Jammer.ep
Pressure Plate -10 0 16 90 0 0 PressurePlate.ep
Plasma Wall -12 0 12.375 -90 0 0 PlasmaDoor.rsc
Plasma Wall -12 0 19.625 -90 0 0 PlasmaDoor.rsc
Plasma Wall -11.625 0 4 0 0 0 PlasmaDoor.rsc
Plasma Wall 12 0 12.375 -90 0 0 PlasmaDoor.rsc
Connector -16 0 -16 0 0 0 EneryRod.ep
Connector -8 0 0 0 0 0 EneryRod.ep
Transponder -4.25 1.5 -8 -90 90 0 EneryEmitter_Red.ep
Transponder -10 1.5 -19.75 0 90 0 EneryEmitter_Red.ep
Transponder -11.75 1.5 2 90 90 0 EneryEmitter_Red.ep
Carriable Item 8 0 8 0 0 0 Cube.ep
Fan 0 0 -18 180 0 0 FanStationary.ep
Time switch 0 0 5 0 0 0 TimeRecorder.ep
Ladder -16 3 4.185 0 0 0 Ladder_Short_JumpOverLedge.ep
Path marker 8 0 6 0 0 0 ---
Path marker 8 0 -8 0 0 0 ---
Mine puppet 8 0 6 0 0 0 Mine.ep
Auto Turret 16 3.25 19.75 180 0 0 AutoTurret.ep
Probe Light 0 2 0 0 0 0 ---
Post Processing effect 0 3 0 0 0 0 ---


Nav Green.png Nav Green.png Nav Green.png Nav Green.png Nav Green.png Nav Green.png Nav Blue.png Nav Blue.png Nav Blue.png