Forum

Change fov value from qc

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Change fov value from qc

Postby Stealth Kill » Fri Jan 25, 2008 7:38 pm

Hi,

Is it possible to change the fov value from qc?

And can i add text in to the console from qc?
Stealth Kill
 
Posts: 83
Joined: Fri Dec 29, 2006 12:34 pm

Postby Orion » Fri Jan 25, 2008 9:03 pm

Did you mean using stuffcmd()?

If so, use something like:

Code: Select all
stuffcmd (self, "fov 115\n");


and it should work.
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby GiffE » Fri Jan 25, 2008 9:55 pm

if ur looking to make a sniper or scope or something DP also supports:
Code: Select all
//DP_VIEWZOOM
//idea: LordHavoc
//darkplaces implementation: LordHavoc
//field definitions:
.float viewzoom;
//description:
//scales fov and sensitivity of player, valid range is 0 to 1 (intended for sniper rifle zooming, and such)
GiffE
 
Posts: 170
Joined: Sun Oct 08, 2006 3:39 pm
Location: USA, CT

Postby Stealth Kill » Fri Jan 25, 2008 11:01 pm

I need some help :)


/*
========
Zoom
========
*/

void () SZoom =
{
if (self.weaponmodel = "progs/v_m87.mdl")
{
if (self.impulse = 61)
stuffcmd (self, "fov 40\n");

}

};

i can´t zoom with my v_m87.mdl when i use impulse 61

and when i add this to impulse commands

if (self.impulse == 61)
SZoom ();


when i have an other weapon in my hand it zooms and it changes to v_m87.mdl
Stealth Kill
 
Posts: 83
Joined: Fri Dec 29, 2006 12:34 pm

Postby Sajt » Sat Jan 26, 2008 12:22 am

Try doubling up some of them there equal signs.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am


Return to QuakeC Programming

Who is online

Users browsing this forum: Bing [Bot] and 1 guest