Welcome, Guest. Please login or register.
Did you miss your activation email?
July 06, 2020, 04:05:11 am

Login with username, password and session length
Search:     Advanced search
Savage: XR is a new patch for Savage, created by the Newerth.com staff. The XR1.1 Client is out now! Download it now!
190005 Posts in 11003 Topics by 18517 Members
Latest Member: Hammadslv
* Home Forum Wiki Help Search Login Register
+  Newerth Forums
|-+  Savage XR
| |-+  General Savage XR Discussion
| | |-+  Help request: bind syntax
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Help request: bind syntax  (Read 3927 times)
BloodFiend
Newbie
*
Posts: 8


View Profile
« on: February 21, 2011, 03:27:03 pm »

I want my mousewheel to control 3 functions as a commander: camera tilt, building rotation, and camera zoom.  I want the functions to be controlled with shift, alt, and no modifier at all (just the mousewheel).

Here's my uneducated attempt that failed:

bind wheeldown "ask iskeydown shift; if [answer] inc cl_cmdr_camtiltx -8; if [!answer] ask iskeydown alt; if [answer]  rotateBuilding -1; else inc cl_cmdr_zoom 150"

(mousewheel should zoom, shift+mousewheel should tilt, and alt+mousewheel should rotate buildings .... now that I think about it I'll probably add ctrl+mousewheel to rotate the camera)
Can someone please explain to me where my syntax errors are and how the bind would look when done correctly?  I've got a general idea of what/where my problem is but I really don't know the proper syntax to fix it and would love to hear from someone with a lot more experience.

Thanks in advance.

**Update**

In a spark of inspiration I tried going about the solution in an entirely new way.  Here is what I came up with:

(placed in a cfg file and loaded with autoexec.cfg)
setBindProfile 1

set shift_down
set alt_down
set ctrl_down

bind shift "set shift_down 1"
bindup shift "set shift_down 0"
bind alt "set alt_down 1"
bindup alt "set alt_down 0"
bind ctrl "set ctrl_down 1"
bindup ctrl "set ctrl_down 0"

bind wheelup "if [shift_down] inc cl_cmdr_camtiltx 2; if [alt_down] rotateBuilding 1; if [ctrl_down] inc cl_cmdr_camtiltz 2; if [!(shift_down + alt_down + ctrl_down)] inc cl_cmdr_zoom -50"

bind wheeldown "if [shift_down] inc cl_cmdr_camtiltx -2; if [alt_down] rotateBuilding -1; if [ctrl_down] inc cl_cmdr_camtiltz -2; if [!(shift_down + alt_down + ctrl_down)] inc cl_cmdr_zoom 50"

-------------------------
Everything works fine except when holding ctrl the camera will tilt in both the z and x axes (for wheelup and wheeldown).
WTF is wrong with my ctrl section that would make it misbehave like that?  I'm sure there is a much simpler means to reach this end and I'd love to hear it Smiley
« Last Edit: February 21, 2011, 05:28:55 pm by BloodFiend » Logged
Trigardon
Forum Administrator
Legendary Member
****
Posts: 4825


Demonic Monster


View Profile WWW
« Reply #1 on: February 21, 2011, 04:57:16 pm »

isn't it "mwheeldown"?
Logged

BloodFiend
Newbie
*
Posts: 8


View Profile
« Reply #2 on: February 21, 2011, 05:02:57 pm »

nope, it's just wheelup and wheeldown.  you may be thinking of lbutton, rbutton, and mbutton
Logged
BloodFiend
Newbie
*
Posts: 8


View Profile
« Reply #3 on: February 21, 2011, 06:30:19 pm »

Ok so turns out the problem wasn't only with my syntax but also that by default Savage sets uses for ctrl+mousewheel and shift+mousewheel and I can't yet find a way to get around it.  Really disapointed.

So I guess my new question would be:  Is there a way to change the function of shift+mousewheel and/or ctrl+mousewheel?  I'm able to bind those key combinations to custom actions but they always execute alongside the default (hardcoded?) actions.
« Last Edit: February 21, 2011, 06:58:41 pm by BloodFiend » Logged
COJ-Suoma
Newerth Donator
Jr. Member
****
Posts: 97


View Profile
« Reply #4 on: February 21, 2011, 07:34:58 pm »

Not sure, but there is commander-keys.cfg on /game/settings. You might want to put that bind there and perhaps look if that combination is used there for something already. Just a wild guess, i know nothing about these things Smiley
Logged

BloodFiend
Newbie
*
Posts: 8


View Profile
« Reply #5 on: February 21, 2011, 09:33:36 pm »

Thanks Suoma.  I did look at commander_keys.cfg in both the /game and /game/settings directories and it doesn't appear that either file is responsible.  I removed them both from autoexec.cfg and still have the same issue.

Savage has it's config data spread over way to many files Sad
Logged
Craw
Jr. Member
**
Posts: 70



View Profile
« Reply #6 on: February 22, 2011, 05:27:00 am »

BloodFiend,

In my experience with this sort of stuff. (Dealing with default settings, etc). You must fiddle with the savageX.s2z files. (where X = a number). If memory serves me, you can fiddle with it by changing the .s2z to a .zip and extracting it. I believe this is how rmod is developed aswell. Don't quote me on this though, I'm not positive about it. =)
Logged

BloodFiend
Newbie
*
Posts: 8


View Profile
« Reply #7 on: February 22, 2011, 06:31:12 pm »

Thanks for the heads up Craw, but it's sounding like more trouble than it's worth.  I've got my settings at a point now that's better than they were, but not as good as I wanted it to be.  I'll just resolve to continue spinning the camera around the z axis with the keyboard.  I was only looking to shave some fractions of a second off my action time; nothing critical but every little bit helps, ya know. Smiley
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.032 seconds with 19 queries.