Buttons
		
		
		
		
		
		Jump to navigation
		Jump to search
		
		
	
介绍
本教程将教你如何为以HL:A为基础的游戏创建按钮。
设置
创建一个测试用的房间。 放入一个 prop_dynamic。将它的模型设置为 models/props/button_1_pusher.vmdl
放入一个名为 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 | 
输出时添加以下属性:
| My Output | Target Entity | Target Input | Parameter | Delay | 
|---|---|---|---|---|
| OnPressed | <targetEntity> | <input> | 0.00 | 
再次选中你的prop_dynamic并将其Parent Name设置为button_pusher.
完成
编译并运行你的地图,现在你应该有了一个可以正常工作的按钮。






























