Buttons
Jump to navigation
Jump to search
Introduction
This tutorial will teach you how to create buttons for HL:A based mods.
Setup
Create a test room. Insert a prop_dynamic. For this tutorial, set its model to models/props/button_1_pusher.vmdl
Insert a func_physical_button mesh entity. Match its volume to the model you chose for the prop_dynamic and, for this tutorial, set the following properties:
Key | Value |
---|---|
Name | button_pusher |
Move direction | <align it with the push direction> |
Speed | 10 |
Delay Before Reset | 0 |
Use sound | Button_Basic.Press |
In the outputs, add the following output:
My Output | Target Entity | Target Input | Parameter | Delay |
---|---|---|---|---|
OnPressed | <targetEntity> | <input> | 0.00 |
Select the prop_dynamic again and set its Parent Name to button_pusher.
Finishing up
Compile and run your map, and you should have a working button.