TTP Map Tutorial: Puzzle Items
In this part of the tutorial we will
- add puzzle elements to the puzzle area.
- 1 Adding Puzzle Items
- 2 Jammer
- 3 Pressure Plate
- 4 Plasma Wall
- 5 Connector
- 6 Transponder
- 7 Cube
- 8 Fan
- 9 Time Switch
- 10 Ladder
- 11 Mine Puppet
- 12 Auto Turret
- 13 Shield, Axe & Switch
- 14 Extra: Probe Light
- 15 Extra: Post Processing Effect
- 16 Position, Orientation and Resource File Data
Adding Puzzle Items
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 .
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 on it.
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|| → |
|Button||Pressure Plate||Params|| → |
|Plasma Door||Plasma wall||Params|| → |
|Connector||Connector||Item params|| → |
| → |
|Energy Emitter||Transponder||Params|| → |
| → |
|Energy Receiver||Transponder||Params|| → |
| → |
|Cube / Hexahedron||Carriable Item||Item params|| → |
|Fan||Fan||Params|| → |
| → |
|Fan Blades||Fan Item||Item params|| → |
|Time Recorder||Time switch||Params|| → |
|Shield / Platform||Platform Item||Item params|| → |
|Axe||Axe||Item params|| → |
|Switch||Switch||Params|| → |
|Ladder||Ladder||Ladder params|| → |
| → |
|Mine||Mine puppet||Puppet params|| → |
| → |
|Turret||Auto turret||Puppet params|| → |
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 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 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.
Screenshot of Jammer.
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).
Screenshot of Pressure Plate.
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).
Screenshot of Plasma wall.
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.
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
- 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.
Screenshot of Plasma wall settings.
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.
- Set this to 7.25 to fit each Plasma wall exactly between two colums in our puzzle area.
- 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.
- 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 in the name field.
- Hold Ctrl+Alt and click with on the Pressure plate in the viewport.
- The Pressure plate is now added as an activator of the Plasma wall.
Screenshot of Connector.
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).
Screenshot of energy emitter.
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.
Screenshot of cube.
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).
Screenshot of fan.
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.
- 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.
Screenshot of time switch.
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).
Screenshot of ladder.
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.
Screenshot of Mine on Path marker.
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 in the name field of the 'Next marker' line to highlight it.
- 5. Hold Ctrl+Alt and click 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 in the name field of the 'First path marker' line to highlight it.
- 8. Hold Ctrl+Alt and click 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).
Screenshot of Auto turret.
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.
- 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.
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.
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
- 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:
|Jammer||-16||0||16||0||0||0|| → |
|Pressure Plate||-10||0||16||90||0||0|| → |
|Plasma Wall||-12||0||12.375||-90||0||0|| → |
|Plasma Wall||-12||0||19.625||-90||0||0|| → |
|Plasma Wall||-11.625||0||4||0||0||0|| → |
|Plasma Wall||12||0||12.375||-90||0||0|| → |
|Connector||-16||0||-16||0||0||0|| → |
|Connector||-8||0||0||0||0||0|| → |
|Transponder||-4.25||1.5||-8||-90||90||0|| → |
|Transponder||-10||1.5||-19.75||0||90||0|| → |
|Transponder||-11.75||1.5||2||90||90||0|| → |
|Carriable Item||8||0||8||0||0||0|| → |
|Fan||0||0||-18||180||0||0|| → |
|Time switch||0||0||5||0||0||0|| → |
|Ladder||-16||3||4.185||0||0||0|| → |
|Mine puppet||8||0||6||0||0||0|| → |
|Auto Turret||16||3.25||19.75||180||0||0|| → |
|Post Processing effect||0||3||0||0||0||0||---|