Fr/Creating a security camera
Voici un guide pour placer des caméras de sécurité, et les faire tomber grâce aux portails.
Créer le model
- Sélectionnez l'Entity Tool (Shift + E) et choisir l'entité npc_security_camera. Placez alors votre caméra comme bon vous semble dans votre map (la base de la caméra contre le mur, généralement).
- Double-cliquez sur le model de la camera pour entrer dans les options (ou Ctrl+T). Nommez le model : cam_01.
A ce moment, vous pouvez tester la map, et voir que la caméra vous suit du regard. Nous allons voir maintenant comme faire tomber la caméra si on crée un portail dessus ...
Décrocher la caméra
En utilisant un portail
Cette fonctionnera uniquement si votre mur accepte la création de portails.
- Créer une brush de 30H x 33W x 5L avec la texture tools/invisible. La base du model de la caméra doit être dans cette brush. La brush est collée au mur, mais ne rentre pas dans le mur.
- On applique sur la brush invisible (ctrl+T, Tie to entity) la fonction func_portal_detector.
- Dans l'onglet Output, on ajoute le paramètre suivant :
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnStartTouchLinkedPortal | (name you gave npc_security_camera) | Ragdoll | <none> | 0.00 | Yes |
En se posant dessus
There is also another method that allows you to make the camera fall if someone tries to stand on top of it. Sometimes, when you design a Portal level, you may not want the player to be able to use the cameras as a derived way to solve the room. To achieve that, you can create a little trigger_once on top of the camera and add the following output to it :
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnTrigger | (name you gave npc_security_camera) | Ragdoll | <none> | 0.00 | No/Yes |
This way, when a player will try to stand on top of the camera, it will detach itself from the wall. You can add sounds and sparks effects if you'd like to give it a more realistic feel. You can even combine this method with the one mentioned above if you wish to.
Conclusion
Et voila, la caméra vous suit selon vos mouvements, et vous pouvez la décrocher en tirant un portail dessus.
See also
|}