This article relates to the game "Half-Life: Alyx". Click here for more information.
This article relates to the workshop tools for "Half-Life: Alyx". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Ladders

From Valve Developer Community
Jump to: navigation, search

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.

Prefab Download: Ladder (v1.0)


Requirements

This requires you to have a hlvr.fgd that has the following entities, these can be found on the repo https://github.com/gvarados1/Half-Life-Alyx-FGD

  • prop_handpose
  • trigger_traversal_modifier
  • info_teleport_magnet,


Completed ladder setup.

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


View of the ladder next to ledge.


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


Ladder with prop_handpose entities added.


Adding Trigger

Draw a brush around the ladder, it is recommended to make it 3 units larger than the ladder. If your trigger is too large, your ladder will not be climbable in manual mode. 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.


Trigger location front. Trigger location side.


The settings on the trigger can be tweaked as needed, assuming the ladder is 70 units high:

Recommended settings

Name Value
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.


Recommended settings

Name Value
Magnet Radius 0
Start Enabled True

Completed ladder setup.


You are now done, Save and Compile and test the ladder ingame

Known Issues

  • You cannot teleport down when at the top of the teleporter
  • You can walk up to the later in Continous movement mode and it will push you up the prop_static ladder
  • In order to engage manual climbing mode, your grabbing hand must leave the trigger volume each time. Make sure your trigger is as form fitting as you can make it.

Helpful Debug Commands

  • vr_hand_pose_debug - 0 / 1

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.