Creating a security camera: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 9: Line 9:
== Making it fall ==
== Making it fall ==


''The following is only necessary if you have placed the camera on a wall where portals can be created.''
''Только для камер расположенных на тех стенах на которых можно будет открыть портал (т.е. если открыть на месте камеры портал - камера отвлится от стены).''


[[image:Portal camera tutorial1.jpg|thumb|right|200px|Create the brush just at the base.]]
[[image:Portal camera tutorial1.jpg|thumb|right|200px|Create the brush just at the base.]]
# Create a brush using the '''tools/toolstrigger''' material. This brush should just cover the base of the camera where it connects to the wall. (Making it too large will cause your camera to fall off even when the portal doesn't touch it.)
# Создайте браш, для текстуры используйте материал'''tools/toolstrigger''' (триггер). Этот браш должен находиться в основании камеры, в том месте где камеры соединяется со стеной.. (Не создавайте слишком большой браш, т.к. этот браш будет служить триггером-индикатором портала, он будет проверять открыт ли портал на данной стене).Смотрите фото справа.
# Make this brush a {{ent|func_portal_detector}}.
# Преобразуйте этот браш в {{ent|func_portal_detector}}.
# Under Output add the following:
# Перейдите на вкладку Outputs:




Outputs Placed in the trigger:
Вкладка OutPuts:
{|
{|
|+Object outputs: func_portal_detector
|+Object outputs: func_portal_detector

Revision as of 06:27, 14 July 2008

As you have most likely noticed, scattered about the Aperture Science facility are cameras which follow you and are detachable from the wall by placing a portal behind them. Using this tutorial you can put them in your map.

Note.pngNote:There is a prefab for a security camera in this archive.

Создание модели

  1. Выберите Entity Tool (Shift + E) выберите в списке npc_security_camera. Затем расположите в нужном вам месте на карте.
  2. Задайте ей имя, например "rm1_camera1" и поставьте модельmodels/props/security_camera.mdl.

Making it fall

Только для камер расположенных на тех стенах на которых можно будет открыть портал (т.е. если открыть на месте камеры портал - камера отвлится от стены).

File:Portal camera tutorial1.jpg
Create the brush just at the base.
  1. Создайте браш, для текстуры используйте материалtools/toolstrigger (триггер). Этот браш должен находиться в основании камеры, в том месте где камеры соединяется со стеной.. (Не создавайте слишком большой браш, т.к. этот браш будет служить триггером-индикатором портала, он будет проверять открыт ли портал на данной стене).Смотрите фото справа.
  2. Преобразуйте этот браш в func_portal_detector.
  3. Перейдите на вкладку Outputs:


Вкладка OutPuts:

Object outputs: func_portal_detector
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouchLinkedPortal (name you gave npc_security_camera) Ragdoll <none> 0.00 Yes

Conclusion

The camera will automatically follow the player around and when a portal is put behind it, fall to the ground. It also automatically leaves a mark on the wall where it was. You can also have it trigger a scene by GlaDOS if you follow this tutorial.

See also