Portal 2

Portal 2

Not enough ratings
p0rtalmaster's Hammer Guide Series Part 08/19
By The Sojourner
Hello and welcome to part 08/19 of my series of mini-guides, designed to help you learn perhaps what is the biggest part of the Portal 2 Authoring tools: Hammer.

For a super-quick version of this series, please check out my other guide, Hammer for the Flustered.
   
Award
Favorite
Favorited
Unfavorite
Intro
This next guide involves the Aperture Science Aerial Faith Plate. It was part of an initiative to investigate how well test subjects could solve problems when they were catapulted into space. Results were highly informative: They could not.
A Little Bit About trigger_catapult
From the VDC Wiki:

The trigger_catapult can be used anywhere you expect the player to land for greater control. For example, you might place a portal on an angled panel and fling out of that. (Point here is, the trigger_catapult can be used for more than just faith plates; it can be used for controlling flings.)

(Use for flings only:) To make sure the catapult doesn't just fling the player when they happen to walk into it, you need to set the thresholds via the
trigger_catapult settings:

Lower threshold This is a percentage, 0 to 1, of the player speed you set.
Upper threshold Same as above but for the upper limit.
UseThresholdCheck Yes

However, the threshold settings are a little difficult to handle:

First off, contrary to common understanding, the thresholds do NOT represent percentages of the player speed in a conventional understanding. Lower threshold is a percentage value that is deducted from the player speed as set in the
trigger_catapult settings while the upper threshold percentage is added to the player speed. For example, say you set the catapult to fling the player at 500 units/second. A lower threshold of 0.1 means the player must travel at least at 90%, i.e. 100% minus 10%, of that: 450 units/second. An upper threshold of 0.5 means the player must not travel faster than 150%, i.e. 100% plus 50%, of that: 750 units/second. As long as the player speed is between these limits the trigger_catapult will catapult the player/object. In consequence, the thresholds only work one way: the lower the thresholds are set the more the player speed has to match the catapulting speed.

Unfortunately, there's more to consider: if there is an
info_target specified for the trigger_catapult, the player speed will be adjusted to reach that target, thus making it impossible to know the exact speed the player will have to be catapulted at. Even if Use Exact Velocity is set to yes, there will probably be variances in player speed. Therefore, catapulting thresholds should cover a somewhat bigger spectrum of possible speeds.

On the bright side, all this can be more or less easily tested: for debugging purposes programmers added the
ent_bbox console command for a graphic display of catapult trajectories in-game. This command will also state current player speed and actual thresholds (in units/second) when the player or an object enters the trigger_catapult. However, in order for this to work a trigger_catapult must have an info_target specified.
Faith Plates
Further history has it that the faith plates were once just plain panels that launched stuff into the air. However, test subjects quickly became lost as to what to do to progress through the test chambers, and so a new model was developed to solve the problem.





Here's what you'll need to make a basic faith plate from scratch (top image): a prop_dynamic with model set to models\props\faith_plate.mdl, a trigger_catapult (brush entity using a trigger texture), an info_target, a logic_relay and an ambient_generic with sound set to Metal_SeafloorCar.BulletImpact. You'll also need some worldbrushes to contain the faith plate (bottom image).

1) Place an info_target where you want the player to land, and give it a name. If the landing zone is on a floor, wall or ceiling, it is recommended that the bullseye overlay be used at that spot, as well as an info_placement_helper if the surface is also portalable.

2) Place the trigger_catapult directly above the portion of the faith plate model (the prop_dynamic) that launches things into the air. Set its properties accordingly:



3) With the logic_relay, set these I/O:



4) Finally, set the trigger_catapult to trigger the logic_relay whenever the player hits it by using its onCatapulted output.

For straight-up faith plates, you can use the alternate animation straightup.
For wall faith plates (and maybe some floor faith plates), you can use the triple-faith-plate model: models\props\faith_plate_128.mdl.

Optionally, you can also create a raised or lowered frame for the faith plate, just like you saw in Valve's maps. Just be sure to raise everything by the height of your frame. Lastly, as you may have already noticed, there are specialized overlay textures for faith plates:
  • signage/mgf_overlay_bullseye
  • signage/mgf_overlay_bullseye_smaller
These blue bullseye overlays are to be placed at the same position as our info_target and resized to 80×80.
Deactivateable Faith Plates
Some of Aperture Science's aerial faith plates can be switched on and off. Traditionally, orange is off and blue is on, contrary to what the colors of the indicator lights on all testing elements may suggest.

To make a faith plate activate/deactivate, you'll need another pair of logic_relays: one for activation and one for deactivation. You'll also need to make sure you use the faith plate model that can switch skins (from blue to orange and vice versa; models\props\faith_plate.mdl does the trick). An additional pair of ambient_generics is also recommended — set the sounds to World.RobotPosInteract for activation and World.RobotNegInteractPitchedUp for deactivation.

1) Place the ambient_generics close to and above that big colored dot in the center of the faith plate.

2) On the "activate" logic_relay, set these I/O:



3) Similarly, on the "deactivate" logic_relay, set these I/O:



4) On your activator, set these I/O:



To start off, disable the trigger_catapult and set the prop_dynamic's skin to 1.
Rotatable Faith Plates
A little more complex are faith plates that can rotate. For simplicity's sake, we'll assume that the faith plate can only be rotated (never deactivated). The ingredients are basically the same, but now we'll also need a func_door_rotating to make the faith plates turn. Since the trigger_catapults can't change targets on the fly, we'll need to create a second trigger_catapult, logic_relay and info_target for our secondary location.



To start, you'll need to carve out a 128×128 hole and make it 64 units deep. The tricky part is creating the func_door_rotating. Once that's done, everything else should fall into place.

1) Create a nodraw cylinder, 192×192, 8 units high. Then carve a 64×128 rectangular hole in the center for the faith plate.

2) Texture the edges with a frame texture such as plastic/plasticwall004a, and the top part with any floor texture you want.

3) Select the four cylindrical brushes and the invisible block and turn them all into a func_door_rotating and give it a name. Set the prop_dynamic's "parent" keyvalue to the fresh-given name of your func_door_rotating.

4) On the func_door_rotating, set these properties:



Additionally, you can set some sounds for when the platform is moving and when it has stopped.
Although liberties can be taken here, here are my recommendations:
  • Start Sound: World.a2Bts2ElevatorTravel
  • Stop Sound: World.a2Bts2ElevatorArrive

Speed can be changed too as needed, although in many cases the default value of 100 should be fine.

5) On the same entity, set these I/O:



6) Finally, for each trigger_catapult, logic_relay and info_target, proceed as above. It may be easier to copy-paste the trigger_catapult and logic_relay and rotate them along with the faith plate model to ensure that they align, and then rename them. You'll also have to check that the I/O is working as expected.

7) Final touches: disable the trigger_catapult not initially in use, position the info_targets and add the bullseye overlays.



Congratulations, you have just created a rotatable faith plate! In general, unlike in PeTI, faith plates can and should face directly toward their targets.

Note: don't use overlays on the rotating faith plate, as overlays can't be parented. If you want signage, you'll need to create a couple more holes and use the textures that aren't overlay textures.
Debugging Tips
  • When a floor button is being used, the faith plate isn't always responding or acting buggy.
    • Fix: make sure the "Allow fast retrigger" flag is checked on all the logic_relays.
  • Faith plate isn't rotating/(de)activating
  • Faith plate isn't animating correctly
  • Sounds aren't playing correctly
    • Double-check your I/O. Yes, all of them.
  • Faith plate isn't animating correctly
    • Double-check the animations. Supported animations for the standard model are: idle, straightup, fast, and angled.
Mistakes to Avoid & More Information

  • Not using a hole for the faith plate. Believe it or not, it looks weird when all we see is something resembling a frame nested into the floor or wall.
  • Using incorrect skins for the activateable faith plate. Normally, orange is OFF and blue is ON. Please don't confuse your test subjects.

More information from the VDC Wiki:
Master Guide List
Please note that there are still some works in progress. This section will be updated as I finish more guides for you!

You are currently viewing part 08/19 in the series.

| 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

Previous Guide (about panels and platforms)
Next Guide (about various standard testing elements)

Please feel free to leave a well-reasoned question or comment below. Either I or a qualified Test Chamber Associate (you'll know because they make all the good maps on the workshop) will respond. If your question or comment is not well-reasoned, I recommend reading over my guides again until you understand them 100%. No further information is required here or will be provided, and you will become an excellent Test Chamber Designer — using Hammer!

6 Comments
The Sojourner  [author] 11 Jun, 2019 @ 3:24am 
If the model's invisible, it could be that you didn't use specifically the prop_dynamic entity and/or that you didn't select the (correct) faith plate model to use for said entity. If that's not the case then I'm kinda at a loss. Best of luck fixing your map if this is the case.
However, if you mean that the faith plate model's intangible , i.e. that the player can fall through it despite the faith plate bring functional, then you just need a brush with the invisible ( tools/toolsinvisible ) texture around it placed in the hole, which will stop both the player and any physics objects (e.g. cubes) from falling through.
TutoredSpider12 4 Jun, 2019 @ 1:54pm 
I tried these steps, and my Faith Plate is functional, but it's invisible it in the game
The Sojourner  [author] 28 Dec, 2017 @ 12:48pm 
Yes, the entity named "catapult_arm" is just the prop_dynamic that is the faith plate.
Grays 28 Dec, 2017 @ 2:37am 
Ok on the rotatable faith plates section, what is your catapult_arm. The faith plate?
The Sojourner  [author] 8 Oct, 2017 @ 12:35pm 
It's optional, and purely for organization — really you could do without it unless you're building an instance (as is usually the case with logic_relay s).
ApertureRemedy 13 Sep, 2017 @ 10:45am 
Why do you use so many logic_relays? For example, when the trigger_catapult is activated, it fires an OnCatapulted output to a relay to play the sounds and animations and such. Why not just have those outputs on the trigger_catapult instead of passing through a relay?