the Rainbow Networks
RN|VQ3 DEFRAG
Map: si
Players: 0 / 18

+++eXy FFA
Map: q3dm6
Players: 2 / 18
The golden pot › RAINBOW NETWORKS › Tech & Support › How To: Put multiple functions on 1 key
How To: Put multiple functions on 1 key
Something wrong with our servers or your system?
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexTech & Support
View previous topic :: View next topic  
Author Message
Joki
Übergod
Übergod


Joined: Apr 16, 2008
Posts: 1037
Location: at tiled stove

PostPosted: Wed Jul 02, 2008 11:13 am    Post subject: How To: Put multiple functions on 1 key Reply with quote

Sometimes you want multiple functions to use on a single key, like turning volume up and down by 1 step with keypad + and -, or toggle the crosshair-color if you can see it bad on a background, or set a special crosshair and sensitivity for each weapon. This is how you do that.

Go to your OA-config folder (On Windows-systems, you get there by opening a new explorer window (windows-key + e) and type in the addressbar %APPDATA%/OpenArena/) and select your baseoa folder. In there make a new file (any texteditor will do, just make a new .txt file and rename it to .cfg after you are done) named like mystuff.cfg.

This is what this mystuff.cfg might look like:

//This will toggle to our 3 favourite weapons and set a sense and crosshair for each
//weapons: 1: pummel, 2: mg, 3: shotgun, 4: grenade, 5: rocket, 6: shaft, 7: rail, 8: plasma, 9: lamergun
set priweapon1 "Weapon 5; sensitivity 4; cg_drawcrosshair 2; set primaryweapon vstr priweapon2" //rocket
set priweapon2 "Weapon 6; sensitivity 3; cg_drawcrosshair 13; set primaryweapon vstr priweapon3" //shaft
set priweapon3 "Weapon 7; sensitivity 1.75; cg_drawcrosshair 4; set primaryweapon vstr priweapon1" //rail
set primaryweapon vstr priweapon1
bind mouse2 "vstr primaryweapon"

This is how it works:

You can just create a new cvar by using
Code::
set <variable_name> "value"
If you want to take more than 1 action inside of it, make your, to seperate them with a semicolon (;).

You can execute the content of a cvar by using
Code::
vstr <cvarname>

What we did is, define a cvars priweapon1, priweapon2, priweapon that will select our weapon, set the fitting sensitivity and crosshair, and set cvar 'primaryweapon' to the next weapon. So the next weapon is selected, once it is run the next time.
Finally we bind a key to the function.

Here are other example:

---------------------------------------------------

//This will toggle trou easy-to-see-crosshair-colors with F8
//hm... colors are:
//0: black, 1: red, 2: green, 3: yellow, 4: blue, 5: cyan, 6: purple, 7: white
set crwhite "ch_CrosshairColor 7; set crcolor vstr crblack"
set crblack "ch_CrosshairColor 0; set crcolor vstr cryellow"
set cryellow "ch_CrosshairColor 3; set crcolor vstr crblue"
set crblue "ch_CrosshairColor 4; set crcolor vstr crwhite"
set crcolor vstr crwhite
bind F8 "vstr crcolor"

//This will set annoying names via F5
set funnyname1 "name ^1Mr^2.^1Spiffy; set myname vstr funnyname2"
set funnyname2 "name ^4Bluish ^5Thingy; set myname vstr funnyname3"
set funnyname3 "name ^5Dr^7.^2Kolossus; set myname vstr funnyname4"
set funnyname4 "name ^1B^2L^3A^4H; set myname vstr funnyname5"
set funnyname5 "name ^7BOOOO^2O^7OO!; set myname vstr funnyname1"
set myname vstr funnyname1
bind F5 "vstr myname"

------------------------------

And don't forget to execute your custom config at the end of your q3confg.cfg, by adding /exec mystuff.cfg at the end of your q3config.cfg.

_________________
Back to top
View user's profile Visit poster's website
chiquita
Alpacas Approved
Alpacas Approved


Joined: Sep 01, 2007
Posts: 1410
Location: psychiatric ward

PostPosted: Wed Jul 02, 2008 1:21 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

uibind MWHEELDOWN "vstr circle91;vstr strafeleft;"

_________________


Last edited by chiquita on Wed Jul 02, 2008 3:07 pm; edited 1 time in total
Back to top
View user's profile
Joki
Übergod
Übergod


Joined: Apr 16, 2008
Posts: 1037
Location: at tiled stove

PostPosted: Wed Jul 02, 2008 1:50 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

Chiquita:
Don't mention cl_yawspeed, cl_pitchspeed, +moveup, wait and that stuff or soon we will have every newbie using a script for rocketjumping... :blarg:

_________________
Back to top
View user's profile Visit poster's website
[sXe]
Forum Addict
Forum Addict


Joined: Sep 27, 2007
Posts: 354
Location: Germany

PostPosted: Wed Jul 02, 2008 1:55 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

Google for elpajuo rocketjump script ;P

_________________

Back to top
View user's profile
Joki
Übergod
Übergod


Joined: Apr 16, 2008
Posts: 1037
Location: at tiled stove

PostPosted: Wed Jul 02, 2008 2:24 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

That's exactly what we DON'T want here!
Thanks a LOT!

_________________
Back to top
View user's profile Visit poster's website
sexylisa
Newbie
Newbie


Joined: Jul 21, 2008
Posts: 2
Location: germany

PostPosted: Mon Jul 21, 2008 11:53 am    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

hey joki,
i copyed your example in my.cfg and added /exec my.cfg... but it doesn't work... what could be the problem?

Sorry for my english ;) but i think, i shouldnt write in german...

_________________
0
Back to top
View user's profile
SnooSnoo
Übergod
Übergod


Joined: Aug 18, 2007
Posts: 1453
Location: Croatia

PostPosted: Mon Jul 21, 2008 12:01 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

Hi, and yes english would be the propper way, but dont worry if there's a word you cant find in english put it in german, plenty ppl here who speak it. :D

_________________
Back to top
View user's profile
sexylisa
Newbie
Newbie


Joined: Jul 21, 2008
Posts: 2
Location: germany

PostPosted: Mon Jul 21, 2008 12:27 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

ok i found the problem myself... the my.cfg didnt start, i must exec it with the console.
joki, u r my personal hero, that was all i ever needed, because my mousewheel is damaged ;)
thx

_________________
0
Back to top
View user's profile
RAZ3R
Elite Haxor!
Elite Haxor!


Joined: Apr 07, 2008
Posts: 185
Location: England

PostPosted: Mon Jul 21, 2008 1:17 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

I don't see the problem with rj/cj scripts etc. Every rj situation is different, so you get more control and accuracy from doing it by hand anyway.
Back to top
View user's profile
Joki
Übergod
Übergod


Joined: Apr 16, 2008
Posts: 1037
Location: at tiled stove

PostPosted: Mon Jul 21, 2008 1:33 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

Ye, I agree. You can also do "dirty" rjumps, if you dont need max height and do lower splashdamage to you. But there are places, where you need to do an almost perfect rjump, like in ztn3tourney1 from the mh to the floor in front of the ra, or maybe when you rjump in aggressor from the rl to the mh. I'd prefer to to see everyone doing it by hand :P

_________________
Back to top
View user's profile Visit poster's website
chiquita
Alpacas Approved
Alpacas Approved


Joined: Sep 01, 2007
Posts: 1410
Location: psychiatric ward

PostPosted: Mon Jul 21, 2008 1:43 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

I'm fine with circle jumps and rail knockback using angles. When it comes to rockets I'm absolutely hopeless. Even on 2xRJ (Tr1ckhouse) I can spend an embarrassing amount of time on the first ones :(
Back to top
View user's profile
SnooSnoo
Übergod
Übergod


Joined: Aug 18, 2007
Posts: 1453
Location: Croatia

PostPosted: Mon Jul 21, 2008 1:49 pm    Post subject: Re: How To: Put multiple functions on 1 key Reply with quote

chiquita wrote:
I'm fine with circle jumps and rail knockback using angles. When it comes to rockets I'm absolutely hopeless. Even on 2xRJ (Tr1ckhouse) I can spend an embarrassing amount of time on the first ones :(

Hear ya


_________________
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum Index -> Tech & Support All times are GMT + 1 Hour
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


The Rainbow Networks website is hosted by JockeTF and Soder on furver.se.

The Rainbow Networks
Interactive software released under GNU GPL, Code Credits, Privacy Policy
Azul theme and related images designed by Jamin