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.

Half-Life: Alyx Workshop Tools/Level Design/Buttons:zh-cn

From Valve Developer Community
Jump to: navigation, search
English (en)Русский (ru)中文 (zh)
... Icon-Important.png

介绍

本教程将教你如何为以HL:A为基础的游戏创建按钮。

设置

创建一个测试用的房间。 放入一个 prop_dynamic。将它的模型设置为 models/props/button_1_pusher.vmdl

HLA SDK Buttons Img1.png

放入一个名为 func_physical_button的网格实体。 并将它绑定于你的 prop_dynamic模型,设置以下属性:

Name button_pusher
Move direction <align it with the push direction>
Speed 10
Delay Before Reset 0
Use sound Button_Basic.Press

HLA SDK Buttons Img2.png

输出时添加以下属性:

My Output Target Entity Target Input Parameter Delay
OnPressed <targetEntity> <input> 0.00

再次选中你的prop_dynamic并将其Parent Name设置为button_pusher.

完成

编译并运行你的地图,现在你应该有了一个可以正常工作的按钮。