Создание нескольких кнопок для одной двери (Portal 2)

From Valve Developer Community
< Ru
Revision as of 12:17, 10 July 2024 by Nesciuse (talk | contribs) (Nesciuse moved page Creating multiple buttons for one door p2/ru to Ru/Creating multiple buttons for one door p2 over redirect: Language prefixes)
Jump to navigation Jump to search
English (en)Русский (ru)Translate (Translate)

Связка двух кнопок

1. Создайте две кнопки (любые - prop_floor_button к примеру)

2. Создайте дверь (в этом примере назовём её door1)

3. Создайте

Warning icon.png
This article has been marked as a candidate for speedy deletion for the following reason:
Use {{Flag|en}} instead.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.

math_counter со следующими настройками

Имя свойства Значение
Name counter
Maximum legal value 2

4. Подключаем кнопки к math_counter

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPressed counter Add 1 0.00 No
Io11.png OnUnPressed counter Subtract 1 0.00 No

(повторите 4 пункт со второй кнопкой)

5. Подключаем math_counter к двери

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnHitMax door1 open 0.00 No
Io11.png OnHitMin door1 close 0.00 No
Io11.png OnHitMax counter SetHitMin 1 0.00 No
Io11.png OnHitMin counter SetHitMin 0 0.00 No


Tip.pngСовет:если хотите увеличить кол-во кнопок,измените число 2 в Maximum legal value на кол-во кнопок

Дополнение

  • статью написал ゲームマスター
  • дополнил GreMirid
  • Удачного обучения :D