Creating a security camera: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
	
	
Note:There is a prefab for a security camera in this archive.
		
	
 (Removed the camera stand trigger, Portal doesn't do this. Fixed general inaccuracies.)  | 
				No edit summary  | 
				||
| Line 7: | Line 7: | ||
== Creating the model ==  | == 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.  | # 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 "  | # Give it a name like "cam1" and set the World Model to '''models/props/security_camera.mdl'''.  | ||
== Making it fall ==  | == Making it fall ==  | ||
| Line 23: | Line 23: | ||
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once  | !  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once  | ||
|-  | |-  | ||
| [[Image:Io11.png]] || OnStartTouchLinkedPortal ||   | | [[Image:Io11.png]] || OnStartTouchLinkedPortal || cam1 || Ragdoll || <none> || 0.00 || Yes  | ||
|}  | |}  | ||
Revision as of 13:31, 23 July 2021
This article or section needs additional screenshots. 
You can upload screenshots at Special:Upload. For help, see the Help:Images.
You can upload screenshots at Special:Upload. For help, see the Help:Images.
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
- 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.
 - 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.
- Create a 
4w*4l*2hbrush 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 func_portal_detector.
 - Under Output add the following:
 
Outputs Placed in the trigger:
| My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
|---|---|---|---|---|---|---|
| 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
External links
- Example map Example map using this tutorial. VMF included.