Forum

static camera activable by impulse

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

static camera activable by impulse

Postby Nahuel » Sat Jul 23, 2011 5:59 pm

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.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: static camera activable by impulse

Postby siska.robert » Sat Jul 23, 2011 8:00 pm

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.
User avatar
siska.robert
 
Posts: 58
Joined: Wed Feb 17, 2010 7:51 pm
Location: Czech Republic

Re: static camera activable by impulse

Postby Nahuel » Sat Jul 23, 2011 10:57 pm

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.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: static camera activable by impulse

Postby siska.robert » Sun Jul 24, 2011 10:15 am

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 :)
User avatar
siska.robert
 
Posts: 58
Joined: Wed Feb 17, 2010 7:51 pm
Location: Czech Republic

Postby ArchAngel » Sun Jul 24, 2011 11:32 pm

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
ArchAngel
 
Posts: 37
Joined: Fri Jun 03, 2011 7:33 pm

Postby Blackstar1000 » Mon Jul 25, 2011 3:34 am

Been googling this one for a week. Want :lol:
Knives out. Catch the mouse. Squash his head. Put him in your mouth.
Blackstar1000
 
Posts: 52
Joined: Mon Sep 13, 2010 5:16 pm

Postby frag.machine » Mon Jul 25, 2011 3:50 am

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)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby Blackstar1000 » Fri Jul 29, 2011 2:49 am

sucks? I don't understand :?
Knives out. Catch the mouse. Squash his head. Put him in your mouth.
Blackstar1000
 
Posts: 52
Joined: Mon Sep 13, 2010 5:16 pm

Postby Dr. Shadowborg » Fri Jul 29, 2011 9:40 pm

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:
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1110
Joined: Sat Oct 16, 2004 3:34 pm

Postby Blackstar1000 » Sat Jul 30, 2011 2:05 pm

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.
Blackstar1000
 
Posts: 52
Joined: Mon Sep 13, 2010 5:16 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest