Camera gun

Camera gun

Re: Camera gun Posted by Carcase on Mon May 23rd 2005 at 12:18am
Carcase
145 posts
Posted 2005-05-23 12:18am
Carcase
member
145 posts 15 snarkmarks Registered: Nov 15th 2003 Location: Northern Virginia
What i'm trying to do is have a camera that you look through, and get to control a machine gun on the other side. If anyone has played games like timesplitters 2, or deus ex invisible war, you'll know what i'm talking about.

So far I have a point_viewcontrol which allows me to see the gun, but i dont know how to get the gun to fire on the other side. Its not necessarily a gun that is attached to a security camera, but a security camera with a gun placed in front of it, that would otherwise be controlled normally by the player. The gun doesn't do anything. The gun and camera are activated by a button on a security console.

Any help would be very welcome. thanks
Re: Camera gun Posted by Rof on Mon May 23rd 2005 at 5:19pm
Rof
210 posts
Posted 2005-05-23 5:19pm
Rof
member
210 posts 41 snarkmarks Registered: Dec 3rd 2004
A func_tank will make the gun. You can either make a brush that looks
like a gun, and tie that to the func_tank, or make an invisible
func_tank brush and use it to control a prop model. There's an example
of the latter in one of the sdk_d2_prison_*.vmf example maps included
in the SDK.

Func_tanks have a "control volume" field that takes the name of a
trigger_brush. That's the place you need to stand to control the
func_tank, and you can put that anywhere.

You can also parent the point_viewcontrol to the func_tank, so that it rotates the POV as you steer the gun.

Be warned that there are apprently problems using func_tanks in
anything other than single-player maps, so it might not work if you're
making this for HL2DM or CSS.
VMEX, Pakrat & Entspy
Re: Camera gun Posted by Carcase on Mon May 23rd 2005 at 8:48pm
Carcase
145 posts
Posted 2005-05-23 8:48pm
Carcase
member
145 posts 15 snarkmarks Registered: Nov 15th 2003 Location: Northern Virginia
pretty much, im trying to make a machine gun similar to that of the airboat. this possible without special code that i know nothing about?
Re: Camera gun Posted by omegaslayer on Mon May 23rd 2005 at 9:15pm
omegaslayer
2481 posts
Posted 2005-05-23 9:15pm
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
Parent the gun model/brush to the func_tank (to give the illusion that
its coming from the gun), like Rof said: Look at the sdk_d2_proson*.vmf
to see how they did it.
Posting And You
Re: Camera gun Posted by Carcase on Mon May 23rd 2005 at 9:54pm
Carcase
145 posts
Posted 2005-05-23 9:54pm
Carcase
member
145 posts 15 snarkmarks Registered: Nov 15th 2003 Location: Northern Virginia
sorry sorry, i will mention exactly waht i am trying to do.

I have a spaceship looking thing thats made out of random props. The spaceship moves along a track and works fine. What does not work fine is trying to put a gun on it. I have the player sit inside a prisoner pod to pilot the pod, but that doesn't allow you to use the gun. so what i was trying to do was give the illusion that you were still sitting inside the spaceship by using a point_viewcontroller, and placing the player in a black box outside of the level with a func_tank inside the box.

the best i can do, is have the viewcontrol stay still (not allow you to look around with the mouse), attached to the ship, and the gun doesn't want to move. it stays still as well, but it fires where you point it.
Re: Camera gun Posted by omegaslayer on Tue May 24th 2005 at 2:36am
omegaslayer
2481 posts
Posted 2005-05-24 2:36am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
That sounds like you didnt parent the gun to the func_tank, dont parent it to the spaceship itself.
Posting And You
Re: Camera gun Posted by Carcase on Tue May 24th 2005 at 11:25pm
Carcase
145 posts
Posted 2005-05-24 11:25pm
Carcase
member
145 posts 15 snarkmarks Registered: Nov 15th 2003 Location: Northern Virginia
hmm. ok well The gun works when its in your own peripheral vision, and not in the point_viewcontrol's peripheral vision. So i personally deem this impossible to do by itself.