Creating a security camera: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Removed skill level)
 
(26 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{Underlinked|date=January 2024}}
{{DISPLAYTITLE: Portal - Tutorial - Security Camera}}
{{lang|Creating a security camera}}
{{Morescreenshots}}
{{back | Portal Level Creation}}
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.
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|There is a prefab for a security camera in [http://esunfx.com/prefabsandfgd.rar this archive].}}
== Creating the model ==
 
# Choose the Entity Tool '''(Shift + E)''' and in the dropdown box, select {{ent|npc_security_camera}}. Then simply place the camera where you want it placed on the map.
== Создание модели==
# Give it a name like "cam1" and set the World Model to '''models/props/security_camera.mdl'''.
# Выберите Entity Tool '''(Shift + E)''' выберите в списке {{ent|npc_security_camera}}. Затем расположите в нужном вам месте на карте.
# Задайте ей имя, например "rm1_camera1" и поставьте модель'''models/props/security_camera.mdl'''.


== 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.]]
# Создайте браш, для текстуры используйте материал'''tools/toolstrigger''' (триггер). Этот браш должен находиться в основании камеры, в том месте где камеры соединяется со стеной.. (Не создавайте слишком большой браш, т.к. этот браш будет служить триггером-индикатором портала, он будет проверять открыт ли портал на данной стене).Смотрите фото справа.
# Преобразуйте этот браш в {{ent|func_portal_detector}}.
# Перейдите на вкладку Outputs:


# Create a <code>4w*4l*2h</code> brush using the '''tools/toolsinvisible''' 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.)
# Make this brush a {{ent|func_portal_detector}}.
# Under Output add the following:


Вкладка OutPuts:
Outputs Placed in the trigger:
{|
{| class=standard-table
|+Object outputs: func_portal_detector
|+Object outputs: func_portal_detector
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
|-
| [[Image:Io11.png]] || OnStartTouchLinkedPortal || (name you gave {{ent |npc_security_camera}}) || Ragdoll || <none> || 0.00 || Yes
| [[File:Io11.png]] || OnStartTouchLinkedPortal || cam1 || Ragdoll || <none> || 0.00 || Yes
|}
|}


== Conclusion ==
== 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 [[Making_GLaDOS_speak|this tutorial]].
Если вы хотите сделать после этого голос GlaDOS читайте этот[[Making_GLaDOS_speak|this]] туториал.


== See also ==
== See also ==
* [[Portal Level Creation]]
* [[Portal Level Creation]]


[[Category:Level Design Tutorials]]
[[Category:Portal]]
[[Category:Level Design]]
[[Category:Tutorials]]

Latest revision as of 17:52, 19 April 2025

Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
English (en)Français (fr)Русский (ru)Translate (Translate)
Portal Level Creation

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.

Creating the model

  1. Choose the Entity Tool (Shift + E) and in the dropdown box, select npc_security_camera. Then simply place the camera where you want it placed on the map.
  2. Give it a name like "cam1" and set the World Model to models/props/security_camera.mdl.

Making it fall

The following is only necessary if you have placed the camera on a wall where portals can be created.

  1. Create a 4w*4l*2h brush using the tools/toolsinvisible 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.)
  2. Make this brush a func_portal_detector.
  3. Under Output add the following:

Outputs Placed in the trigger:

Object outputs: func_portal_detector
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouchLinkedPortal cam1 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