Zh/Creating multiple buttons for one door: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
m (- changed links to :lang suffix redirect pages to the redirected link)
m (obsolete language category)
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:


==门,按钮和触发器==
==门,按钮和触发器==
按照教程[[Floor button|地面按钮]][[Test Chamber Door|实验室门]]创建门和两个按钮。
按照教程{{L|Floor button|地面按钮}}{{L|Test Chamber Door|实验室门}}创建门和两个按钮。


==设置开门按钮==
==设置开门按钮==
创建一个[[math_counter]]实体,然后将其放在门附近。设置以下属性:
创建一个{{L|math_counter}}实体,然后将其放在门附近。设置以下属性:
::{| class=standard-table
::{| class=standard-table
!  Property Name || Value
!  Property Name || Value
Line 44: Line 44:


[[Category:Portal]]
[[Category:Portal]]
[[Category:Level Design:zh-cn]]
{{ACategory|Level Design}}
[[Category:Tutorials]]
[[Category:Tutorials]]

Latest revision as of 04:13, 22 August 2024

English (en)Русский (ru)中文 (zh)Translate (Translate)
传送门关卡制作

本教程将详细介绍仅在激活两个(或更多)按钮时才能打开门的基础知识。

门,按钮和触发器

按照教程地面按钮(en)实验室门(en)创建门和两个按钮。

设置开门按钮

创建一个math_counter(en)实体,然后将其放在门附近。设置以下属性:

Property Name Value
Name door_counter
Maximum Legal Value 2

对于Maximum Legal Value key value,输入任意一个你想要的数字。

现在转到“输出”并设置以下输出:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnHitMax door_left Open <none> 0.00 No
Io11.png OnHitMax door_right Open <none> 0.00 No

现在转到每个画笔实体并设置以下输出:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnOpen door_counter Add 1 0.00 No
Io11.png OnClose door_counter Subtract 1 0.00 No
Io11.png OnClose door_left Close <none> 0.00 No
Io11.png OnClose door_right Close <none> 0.00 No


参考