🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.games.quake3
Article #286318

Re: Fetching current config values?

#286318
From: Dayta
Date: Thu, 16 Feb 2006 22:31
180 lines
6052 bytes
IT IS possible !!
pff despite the funny fact that some dont know how i see no reason why it 
shouldnt be .. 

i try to explain in words

make sure you got a bind for each weapon like .. 

bind j "vstr W_MG;ECHO "^3MG""
bind y "vstr W_SG;ECHO "^3SG""
bind q "vstr W_GL;ECHO "^2GL""
bind h "vstr W_RL;ECHO "^1RL""
bind u "vstr W_LG;ECHO "^7LG""
bind m "vstr W_RG;ECHO "^6RG""
bind n "vstr W_PG;ECHO "^5PG""


set W_MG "vstr W_MG_sens; vstr W_MG_weap; vstr W_MG_fov"
set W_MG_sens "seta sensitivity "3""
set W_MG_weap "weapon 2"
set W_MG_fov "set cg_fov 90"

set W_SG "vstr W_SG_sens; vstr W_SG_weap; vstr W_SG_fov"
set W_SG_sens "seta sensitivity "5""
set W_SG_weap "weapon 3"
set W_SG_fov "set cg_fov 90"

set W_GL "vstr W_GL_sens; vstr W_GL_weap; vstr W_GL_fov"
set W_GL_sens "seta sensitivity "5""
set W_GL_weap "weapon 4"
set W_GL_fov "set cg_fov 90"

set W_RL "vstr W_RL_sens; vstr W_RL_weap; vstr W_RL_fov"
set W_RL_sens "seta sensitivity "5""
set W_RL_weap "weapon 5"
set W_RL_fov "set cg_fov 90"

set W_LG "vstr W_LG_sens; vstr W_LG_weap; vstr W_LG_fov"
set W_LG_sens "seta sensitivity "3""
set W_LG_weap "weapon 6"
set W_LG_fov "set cg_fov 90"

set W_RG "vstr W_RG_sens; vstr W_RG_weap; vstr W_RG_fov"
set W_RG_sens "seta sensitivity "3""
set W_RG_weap "weapon 7"
set W_RG_fov "set cg_fov 90"

set W_PG "vstr W_PG_sens; vstr W_PG_weap; vstr W_PG_fov"
set W_PG_sens "seta sensitivity "5""
set W_PG_weap "weapon 8"
set W_PG_fov "set cg_fov 90"

OK sofar .. we got now each weapon set each one with different sensitivtiy 
or fov (i just add them to give a better understanding)

now we need a special cvar we have to invent that on our own ... lets name 
it
W_PW for Weapon Previous Weapon
the trick now is that we add this value to each weapon selection there for 
when i select the shutgun ... it will add the value of the shotguncommand 
to this ONE new comand W_PW .. the script will look then this way


bind j "vstr W_MG;ECHO "^3MG""
bind y "vstr W_SG;ECHO "^3SG""
bind q "vstr W_GL;ECHO "^2GL""
bind h "vstr W_RL;ECHO "^1RL""
bind u "vstr W_LG;ECHO "^7LG""
bind m "vstr W_RG;ECHO "^6RG""
bind n "vstr W_PG;ECHO "^5PG""


set W_MG "vstr W_MG_sens; vstr W_MG_weap; vstr W_MG_fov; vstr W_PW_set"
set W_MG_sens "seta sensitivity "3""
set W_MG_weap "weapon 2"
set W_MG_fov "set cg_fov 90"
set W_PW_set "vstr W_MG"

set W_SG "vstr W_SG_sens; vstr W_SG_weap; vstr W_SG_fov; vstr W_PW_set"
set W_SG_sens "seta sensitivity "5""
set W_SG_weap "weapon 3"
set W_SG_fov "set cg_fov 90"
set W_PW_set "vstr W_SG"

set W_GL "vstr W_GL_sens; vstr W_GL_weap; vstr W_GL_fov; vstr W_PW_set"
set W_GL_sens "seta sensitivity "5""
set W_GL_weap "weapon 4"
set W_GL_fov "set cg_fov 90"
set W_PW_set "vstr W_GL"

set W_RL "vstr W_RL_sens; vstr W_RL_weap; vstr W_RL_fov; vstr W_PW_set"
set W_RL_sens "seta sensitivity "5""
set W_RL_weap "weapon 5"
set W_RL_fov "set cg_fov 90"
set W_PW_set "vstr W_RL"

set W_LG "vstr W_LG_sens; vstr W_LG_weap; vstr W_LG_fov; vstr W_PW_set"
set W_LG_sens "seta sensitivity "3""
set W_LG_weap "weapon 6"
set W_LG_fov "set cg_fov 90"
set W_PW_set "vstr W_LG"

set W_RG "vstr W_RG_sens; vstr W_RG_weap; vstr W_RG_fov; vstr W_PW_set"
set W_RG_sens "seta sensitivity "3""
set W_RG_weap "weapon 7"
set W_RG_fov "set cg_fov 90"
set W_PW_set "vstr W_RG"

set W_PG "vstr W_PG_sens; vstr W_PG_weap; vstr W_PG_fov; vstr W_PW_set"
set W_PG_sens "seta sensitivity "5""
set W_PG_weap "weapon 8"
set W_PG_fov "set cg_fov 90"
set W_PW_set "vstr W_PG"


OOOOKKK here we go .. now lets say you got a rocket jump script (i suggest 
you learn own roket jumping human can own each script .. you can take a 
look at my videos on www.quad8.com or www.own-age.com search for declip .. 
but back to the topic)

lets say your rocket script is here

ROCKETSCRIPT blabla tests whatever...;
vstr W_PW <- just add this line ... 


now .. lets think about the example i select the ligthning gun ... 
its set on "u" i press u .. the ECHO tells me LG fine and it executes the 
W_LG ... let see whats happen there W_LG executes the W_lg sens .. fine 3 
now the weapon change (to weaopn 6 nice) the fov and sets the W_PW my new 
command variable to W_LG .. so the same as it was on the "u" button.. 

now i use the rocket jump and .. after the rockt jump is done it executes 
the W_LG which is the same (cause we set it by selecting the weapon) as i 
would press "u" on the keyboard again .. its all automated this way and you  
get back your lightning gun cause the same weapon selection sens and stuff 
runs again. 

i tested it .. worked .. if you got question feel free to join my server 
/connect quad8.com 1.31 there are many people who are nice and helpfull if 
you need help. GL with your work and final words

"i never saw any reason to belive that something could be impossible"
hope i could help greetings 

 _l Dayta l_ 
www.quad8.com














"Mark" <nospam@thanksanyway.org> wrote in news:q4Gdncf58-mcMHreRVn-rw@w-
link.net:

> Hello.
> 
> Is there any way for a Quake 3 config script to fetch a
> current value (say, the currently selected weapon) and
> use that value in a script?
> 
> For example, a rocket-jump keybound script that would
> switch to the rocket for the jump, and then reselect
> whichever weapon you had selected before you pressed
> your rocket-jump key?
> 
> Thanks
> -Mark
> 
> 
> 
Technical Details
Message-ID: <Xns976CEEFC58A40Lore@216.40.28.23>
Path: mbox-mo1.pugleaf.net!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!novia!sequencer.newscene.com!not-for-mail
References: <q4Gdncf58-mcMHreRVn-rw@w-link.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!novia!sequencer.newscene.com!not-for-mail
From: Dayta <Dayta@quad8.com>
Newsgroups: alt.games.quake3
Subject: Re: Fetching current config values?
Date: 16 Feb 2006 16:31:08 -0600
Organization: Premium-News, http://www.premium-news.com/
Lines: 181
Message-ID: <Xns976CEEFC58A40Lore@216.40.28.23>
References: <q4Gdncf58-mcMHreRVn-rw@w-link.net>
User-Agent: Xnews/5.04.25
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit