Point devshot camera: Difference between revisions
mNo edit summary |
(-added class hierarchy and internal names) |
||
Line 1: | Line 1: | ||
[[File: point_viewcontrol.png | right | 300px]] | [[File: point_viewcontrol.png | right | 300px]] | ||
{{CD|CPointDevShotCamera|file1=point_devshot_camera.cpp}} | |||
{{base point|point_devshot_camera}} It is used by the -makedevshots system, which automatically takes screenshots at the position of every devshot camera in the level. | {{base point|point_devshot_camera}} It is used by the -makedevshots system, which automatically takes screenshots at the position of every devshot camera in the level. | ||
Line 20: | Line 21: | ||
== Keyvalues == | == Keyvalues == | ||
{{KV|Camera Name|string|Used as the name of the directory to store screenshots from this camera. Must be unique within the level. | {{KV|Camera Name|intn=cameraname|string|Used as the name of the directory to store screenshots from this camera. Must be unique within the level. | ||
{{warning|Failing to set a name will lead to the screenshot process failing at runtime}}}} | {{warning|Failing to set a name will lead to the screenshot process failing at runtime}}}} | ||
{{KV|Camera FOV|integer|FOV of this camera.}} | {{KV|Camera FOV|intn=FOV|integer|FOV of this camera.}} | ||
{{KV Angles}} | {{KV Angles}} | ||
Revision as of 06:30, 6 November 2022
![]() |
---|
CPointDevShotCamera |
![]() |
Template:Base point It is used by the -makedevshots system, which automatically takes screenshots at the position of every devshot camera in the level.

CPointDevShotCamera
class, defined in thepoint_devshot_camera.cpp
file.
Basic Usage
Place a point_devshot_camera entity in your map and give it a name, the name of the area it looks at is a good name. If you want you can make sure the angle and location are good by using spectate ingame and using getpos in the console to find your co-ordinates and angle. Adjust the FOV to match what you're using ingame if you wish and that's all the entity itself needs.
Next, open up your compile options and either in the input bar at the bottom of the normal mode add -makedevshots or in the $game_exe section of the expert mode add the same thing. Make sure you remove options such as -dev so that your screenshots don't have the console in them!
Once you have compiled your map the mod will load up and just let it be, it will load the map and take the screenshots automatically. The screenshots will be saved to <mod>/screenshots/<mapname>/<cameraname> as .tga files.
An example of what can be achieved with these from Team Fortress 2

Devshot cameras can be loaded from a text file in the maps folder with the same name as the map, but with the extension *.txt, using standard keyvalue syntax. It's the same data as the entity keyvalues in hammer.
Keyvalues
- Camera Name (cameraname) <string>
- Used as the name of the directory to store screenshots from this camera. Must be unique within the level.

- Camera FOV (FOV) <integer>
- FOV of this camera.
- Pitch Yaw Roll (Y Z X) (angles) <QAngle>
- This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Inputs
- TakeScreenshot (only in
)
- Teleport and take a screenshot from this camera (Softlocks the player. Restart the map)
Example
MapCameras
{
TestCamera1
{
origin "256 256 256"
angles "-15 50 0"
FOV 90
}
TestCamera2
{
origin "-256 -256 -256"
angles "90 0 0"
FOV 90
}
}