console commands

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
i want to set cam_idealdist to a key, but when i hit the key, I want to add a number to the current distance every time. lets say it starts at 50 and i want the key to add 20 more to it. can i bind it somehow so when i hit the key, it will go from 50 to 70 to 90 ect..?
 

evilsquirrel

New Adventurer
MSC Developer
RiP
Joined
Jan 2, 2006
Messages
2,905
Reaction score
0
Age
36
Location
middle of nowhere
you could bind multiple presets of it...ie 20, 40, 60, 80, 100. but i dont think you can add a number to it.
 

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
:( because my idea was to bind it to the invnext and invprev (mouse wheel) so it could be like a real 3rd person rpg
 

Shurik3n

New Adventurer
MSC Developer
RiP
Joined
Aug 15, 2006
Messages
1,357
Reaction score
0
Age
34
you could write a long script to do it...

bind mwheelup plusdist
alias plusdist ten
alias ten "cam_idealdist 10;alias plusdist twenty"
alias twenty "cam_idealdist 20;alias plusdist thirty"
alias thirty "cam_idealdist 30;alias plusdist forty"

and so on... I can't think of a good when to come back down though.
 

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
awesome if it will work. though I have no idea how to script so I cant do it for the community
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Stick Shurik3n's code in your autoexec.cfg, and type "exec autoexec.cfg" once in console before trying it out.

However, I think the +camdistance is locked in MSC (seems to always snap back).
 

davidos

New Adventurer
Joined
Sep 26, 2006
Messages
18
Reaction score
0
Shurik3n said:
you could write a long script to do it...

bind mwheelup plusdist
alias plusdist ten
alias ten "cam_idealdist 10;alias plusdist twenty"
alias twenty "cam_idealdist 20;alias plusdist thirty"
alias thirty "cam_idealdist 30;alias plusdist forty"

and so on... I can't think of a good when to come back down though.

Same for bind mwheeldown mindist

alias minten "cam_idealdist 20;alias mindist mintwenty"
etc etc.


I'll add something REAL here if I feel like it.

Just tell me what exactly you want the distances to be
and I will make a full script for ya, when I find the time.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Code:
alias dist20 "cam_idealdist 20;alias plusdist dist40;alias minusdist dist80" 
alias dist40 "cam_idealdist 40;alias plusdist dist60;alias minusdist dist20" 
alias dist60 "cam_idealdist 60;alias plusdist dist80;alias minusdist dist40"
alias dist80 "cam_idealdist 80;alias plusdist dist20;alias minusdist dist60"
alias plusdist dist20
alias minusdist dist80
bind mwheelup plusdist 
bind mwheeldown minusdist

That'll do 'er. Granted, not tested it.. I've my mousewheel is bound to the "hud_scroll down" and "hud_scroll up" functions that scroll through skills while the scroll wheel button is bound to playerinfo - find that too handy to give up. Could bind these to a key though. eg. bind "x" minusdist or
bind kp_downarrow plusdist
bind kp_uparrow minusdist
to bind them to the up and down arrows on the numeric pad.
 

Shurik3n

New Adventurer
MSC Developer
RiP
Joined
Aug 15, 2006
Messages
1,357
Reaction score
0
Age
34
Also, you will probably want to change it from increasing by tens and twenties to atleast 50, unless your making a ton of aliases, because the default distance is like 80 or something.
 

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
so lets say i wanted starting 80 and going up 20 each time i mwheelup, when I mwheeldown, will it start on the furthest distance (300 or so) then go down or will it go down from where mwheelup ended?
 

Shurik3n

New Adventurer
MSC Developer
RiP
Joined
Aug 15, 2006
Messages
1,357
Reaction score
0
Age
34
Hold on, I will write a long script for this...
Code:
alias camup cam100
alias camdown cam80
alias cam80 "alias camup cam100; cam_idealdist 80"
alias cam100 "alias camup cam120; alias camdown cam80;cam_idealdist 100"
alias cam120 "alias camup cam140; alias camdown cam100;cam_idealdist 120"
alias cam140 "alias camup cam160; alias camdown cam120;cam_idealdist 140"
alias cam160 "alias camup cam180; alias camdown cam140;cam_idealdist 160"
alias cam180 "alias camup cam200; alias camdown cam160;cam_idealdist 180"
alias cam200 "alias camup cam220; alias camdown cam180;cam_idealdist 200"
alias cam220 "alias camup cam240; alias camdown cam200;cam_idealdist 220"
alias cam240 "alias camup cam260; alias camdown cam220;cam_idealdist 240"
alias cam260 "alias camup cam280; alias camdown cam240;cam_idealdist 260"
alias cam280 "alias camup cam300; alias camdown cam260;cam_idealdist 280"
alias cam300 "alias camup cam320; alias camdown cam280;cam_idealdist 300"
alias cam320 "alias camup cam340; alias camdown cam300;cam_idealdist 320"
alias cam340 "alias camup cam360; alias camdown cam320;cam_idealdist 340"
alias cam360 "alias camup cam380; alias camdown cam340;cam_idealdist 360"
alias cam380 "alias camup cam400; alias camdown cam360;cam_idealdist 380"
alias cam400 "alias camdown 380; cam_idealdist 400"

Goes from 80 to 400, just bind mwheelup to camup and mwheeldown to camdown (or vice versa) and it will go up and down as you turn the wheel. Make sure you either have this whole script in your config.cfg OR in your autoexec.cfg with
Code:
exec autoexec.cfg
in your config.cfg.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
What, ya don't like my flip over function, so you only have to bind one or the other? ;)

You'll need to add
Code:
bind mwheelup camup
bind mwheeldown camdown

To the one Shurik3n just posted, or it won't be bound to anything.
 

Shurik3n

New Adventurer
MSC Developer
RiP
Joined
Aug 15, 2006
Messages
1,357
Reaction score
0
Age
34
Shurik3n said:
just bind mwheelup to camup and mwheeldown to camdown (or vice versa) and it will go up and down as you turn the wheel.
 

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
well the further distance part works but the closer doesnt. and when i start it at lets say 80, and press lower, it goes to highest dist and stays there.
 

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
bump, cuz i really want this to work
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Code:
alias dist020 "cam_idealdist 20;alias zoomout dist040;alias zoomin dist350" 
alias dist040 "cam_idealdist 40;alias zoomout dist060;alias zoomin dist020" 
alias dist060 "cam_idealdist 60;alias zoomout dist080;alias zoomin dist040" 
alias dist080 "cam_idealdist 80;alias zoomout dist150;alias zoomin dist060" 
alias dist150 "cam_idealdist 150;alias zoomout dist200;alias zoomin dist080" 
alias dist200 "cam_idealdist 200;alias zoomout dist250;alias zoomin dist150" 
alias dist250 "cam_idealdist 250;alias zoomout dist300;alias zoomin dist200" 
alias dist300 "cam_idealdist 300;alias zoomout dist350;alias zoomin dist250" 
alias dist350 "cam_idealdist 350;alias zoomout dist020;alias zoomin dist300" 
alias zoomin dist350
alias zoomout dist040
bind "'" zoomin
bind ";" zoomout

Tested, works for me (bound to ' and ; keys) - replace with mwheelup and mwheeldown, if desired. Place in autoexec.cfg, and type exec autoexec.cfg at console after joining a game the first time you use it.
 

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
yep. works great. if there was a cap on the distance so it wouldnt start at the beginning again, that would be like icing on cake. but if not then fine as is. thanks thoth
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Code:
alias dist020 "cam_idealdist 20;alias zoomout dist040;alias zoomin dist020" 
alias dist040 "cam_idealdist 40;alias zoomout dist060;alias zoomin dist020" 
alias dist060 "cam_idealdist 60;alias zoomout dist080;alias zoomin dist040" 
alias dist080 "cam_idealdist 80;alias zoomout dist150;alias zoomin dist060" 
alias dist150 "cam_idealdist 150;alias zoomout dist200;alias zoomin dist080" 
alias dist200 "cam_idealdist 200;alias zoomout dist250;alias zoomin dist150" 
alias dist250 "cam_idealdist 250;alias zoomout dist300;alias zoomin dist200" 
alias dist300 "cam_idealdist 300;alias zoomout dist350;alias zoomin dist250" 
alias dist350 "cam_idealdist 350;alias zoomout dist350;alias zoomin dist300" 
alias zoomin dist020
alias zoomout dist040
bind "'" zoomin
bind ";" zoomout

Same thing, sans wrap-around.
 

Hijacker27

New Adventurer
Joined
Jan 7, 2006
Messages
17
Reaction score
0
If only the 'thirdperson' command wasn't a command but a variable instead, I'd be able to make it go into first person when you're all the way zoomed in, and then third person when you start to zoom out.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Code:
alias dist020 "cam_idealdist 20;alias zoomout dist040;alias zoomin dist020" 
alias dist040 "thirdperson;cam_idealdist 40;alias zoomout dist060;alias zoomin dist020" 
alias dist060 "cam_idealdist 60;alias zoomout dist080;alias zoomin dist040" 
alias dist080 "cam_idealdist 80;alias zoomout dist150;alias zoomin dist060" 
alias dist150 "cam_idealdist 150;alias zoomout dist200;alias zoomin dist080" 
alias dist200 "cam_idealdist 200;alias zoomout dist250;alias zoomin dist150" 
alias dist250 "cam_idealdist 250;alias zoomout dist300;alias zoomin dist200" 
alias dist300 "cam_idealdist 300;alias zoomout dist350;alias zoomin dist250" 
alias dist350 "cam_idealdist 350;alias zoomout dist350;alias zoomin dist300" 
alias zoomin dist020 
alias zoomout dist040 
bind "'" zoomin 
bind ";" zoomout
Still works, since the game always starts in first person, so, in this version, if you zoom out, it goes into third person, and when you zoom back in, it goes back to first (although, you lose one zoom level here, cuz I'm lazy - but it could be done with another zoom level).
 

PBarnum

New Adventurer
MSS Developer
MSC Developer
RiP
Joined
Jun 14, 2006
Messages
3,031
Reaction score
4
wow thats awesome
 
Top