Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
BrassKnight

How do you make a security camera in GZDoom Builder UDMF format?

Question

So I have been looking through some tutorials about this and I couldn't seem to follow them so I decided to ask here how to do it. I barely know any knowledge of cameras in Doom so could you explain it in good detail while being easy to understand? That would be great.

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1

You place the SecurityCamera thing where you want it.

If you want to see through it (which I'm assuming is what you want), you need to tag it and write a script like this:

script "Camera 1" (void)
{
 ChangeCamera (tid, who, revert);
}

Where TID is the camera's tag, who is either 0 (the activator) or 1 (all players), and revert is the time in tics before the view snaps back to the player.

Here are a couple example scripts that will work the same way.

script "Camera 1" (void)
{
 ChangeCamera (1, 0, 35); //This will wait one second before going back to the player
}

script "Camera 2" (void)
{
 ChangeCamera (1, 0, 0);
 Delay (35);
 ChangeCamera (0, 0, 0); //Essentially the same as the above.
}

Of course, you'll need to apply action 80 to a line for the player to activate the script, but I expect you know how to do this.

Share this post


Link to post
  • 0

Finally just to add, if you want the image from the camera to appear in the level as a physical screen (as opposed to just a new viewpoint for the player camera) you need a SetCameraToTexture.

Share this post


Link to post
  • 0

One issue with @Aquila Chrysaetos's example:

 

script "Camera 1" (void)
{
  ChangeCamera(1, 0, 35); //This will wait one second before going back to the player
}

 

The last parameter is boolean, not tics. So you'd need to do this instead:

 

script "Camera 1" (void)
{
  ChangeCamera(1, 0, 0); //This will wait one second before going back to the player
  Delay(35);
  ChangeCamera(0, 0, 0);
}
Edited by Nevander

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×