static camera activable by impulse

Discuss programming in the QuakeC language.
Post Reply
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

static camera activable by impulse

Post by Nahuel »

Hello :) ! I would like to know if someone knows how create a static camera activable by an impulse. Bony that the player activates it and deactivates it from any place of the map to see a specific point on the map. That this can seem easy, but I have tried to suppose it in my head of noob and it is to me quite difficult: can anybody give me any sugestion or some example? from already, thank you very much :)
hi, I am nahuel, I love quake and qc.
siska.robert
Posts: 58
Joined: Wed Feb 17, 2010 7:51 pm
Location: Czech Republic
Contact:

Re: static camera activable by impulse

Post by siska.robert »

custents does have remote cameras.
http://wartrench.telefragged.com/custents.html
Search for func_remote_cam()

Basicaly, you just need to remember player's coordinates and angles, teleport him on camera's location (hide gun etc...) and then load remembered values after another impulse is raised...

The remote cam from custents (actually from x-men TC...) can do much more cool stuff though. Like chaining multiple cameras, moving/tracking cameras and such.
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: static camera activable by impulse

Post by Nahuel »

siska.robert wrote:custents does have remote cameras.
http://wartrench.telefragged.com/custents.html
Search for func_remote_cam()

Basicaly, you just need to remember player's coordinates and angles, teleport him on camera's location (hide gun etc...) and then load remembered values after another impulse is raised...

The remote cam from custents (actually from x-men TC...) can do much more cool stuff though. Like chaining multiple cameras, moving/tracking cameras and such.
thanks siska robert! the code from custents seem´s too complex. I do not need an advanced camera. I only need a simple static camera. Do you know how can i remember the player´s cordinates? I think in something similar to the "info_intermission" but switcheable... :( I am really lost with this, i can´t find something similar like example...
hi, I am nahuel, I love quake and qc.
siska.robert
Posts: 58
Joined: Wed Feb 17, 2010 7:51 pm
Location: Czech Republic
Contact:

Re: static camera activable by impulse

Post by siska.robert »

You can just define new variables in defs.qc (like .vector cam_org; and .vector cam_ang;) to "remember" them. But that is the smallest problem...

The bigger problems are
1) how to find out, you're standing in trigger, so the impulse should work,
2) when camera faces the spot from which it was activated, you need to create some dummy entity that stands for player (his model/origin/angles).

etc...

Ask, if anything. I'm kinda interested in this for my own mod :)
ArchAngel
Posts: 37
Joined: Fri Jun 03, 2011 7:33 pm

Post by ArchAngel »

I don't know where you'd find it these days but one of the very early QuakeC mods was a rocket camera (i.e. you fired a rocket and could then pilot it around the level). It did most of what you want but wasn't all that complex. Might be an idea to look for that
Blackstar1000
Posts: 52
Joined: Mon Sep 13, 2010 5:16 pm

Post by Blackstar1000 »

Been googling this one for a week. Want :lol:
Knives out. Catch the mouse. Squash his head. Put him in your mouth.
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

You guys can also check the intermission code. It's as simple as sending a network message setting the camera entity for the client.

PS: 6 minutes between posts sucks. :?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Blackstar1000
Posts: 52
Joined: Mon Sep 13, 2010 5:16 pm

Post by Blackstar1000 »

sucks? I don't understand :?
Knives out. Catch the mouse. Squash his head. Put him in your mouth.
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Post by Dr. Shadowborg »

frag.machine wrote: PS: 6 minutes between posts sucks. :?
I have now set this to 3 minutes. (at least I hope so) :P

If that still seems to be too much, I'll lower it again. :wink:
Blackstar1000
Posts: 52
Joined: Mon Sep 13, 2010 5:16 pm

Post by Blackstar1000 »

AH! Okay I though I had done something wrong. Yes the 6 min. was driving me nuts, I only have 10 min. breaks at work. I could not reply to more than one topic!
Knives out. Catch the mouse. Squash his head. Put him in your mouth.
Post Reply