Half-Life: Alyx Workshop Tools/Level Design/Ladders
Introduction
This tutorial will teach you to create ladders for Half Life: Alyx mods. These ladders allow you to use all movement types such as a teleport up ladders as well as manual climbing each rung.
A preconfigured prefab will be released soon.
Requirements
This requires you to have a hlvr.fgd that has the entities; prop_handpose and trigger_traversal_modifier, info_teleport_magnet, these can be found on the repo https://github.com/gvarados1/Half-Life-Alyx-FGD (PENDING PULL REQUEST)
Setup
Ladder Model
Insert a prop_static entity and select the ladder model models/props/metal_ladder_001/metal_ladder_001_128.vmdl. This is only used as a visual guide in game. Rotate it as necessary
Adding Grab Hands
Next, hand markers need to be placed on the ladder which defines grab points for the players hands. On the right edge of the ladder rungs, add a new prop_handpose entity that sits over each metal rung.
Recommended settings
Name | Value | Minimum Distance | 4 |
---|---|---|---|
Maximum Distance | 6 | ||
Distance Bias | 0.3 | ||
Disengage Distance | 16 | ||
Use Proximity Bone | False | ||
Extend Size | 0 -2 18 | ||
Delete After Spawn | False | ||
Start Disabled | False | ||
Auto Grip | False | ||
Ignore Hand | -1 | ||
Model | Grab Pole |
Adding Trigger
Draw a brush around the ladder, it is recommended to make it 3 units larger than the ladder. The trigger is the zone that will allow the player to teleport to the top.
With the new brush selected, press Ctrl + T to tie it to an entity, and change the type to trigger_traversal_modifier. This will automatically apply a trigger material. With the trigger selected, select Center Origin.
The settings on the trigger can be tweaked as needed, assuming the ladder is 70 units high:
Target Point: 0, 0 ,0 Ladder Top Exit: 0, 0, 70 Ladder Bottom Exit: -1, -25, -67
Just in front of the trigger_traversal_modifier, create an info_teleport_magnet entity. This allows snaps the players teleport marker to the position when it gets close. This allows the player to easily teleport to the base of the ladder.
Magnet Radius: 0 Start Enabled: True
You are now done, Save and Compile and test the ladder ingame
Helpful Debug Commands
vr_hand_pose_debug <0/1> - Off / On
This command renders helper overlays in-game that indicate where the hand pose grab markers are. It also shows the position and size the of extend boxes that is where the user can grab.