Optimizing My Control Settings


(kevinski) #1

Any good scripting tutorials anywhere online? I’m basically just trying to optimize my control settings, and part of this involves using the mouse wheel as follows (kinda like in Hidden and Dangerous):

• When standing, move the mouse wheel down to get into a crouching position, or move it up to get into a prone position.

• When crouching, move the mouse wheel down to get into a prone position, or move it up to stand up.

• When prone, move the mouse wheel down to stand up, or move it up to get into a crouching position.

Note that I don’t want to hold a button to remain in a crouched position. These should toggle. I’ve found that this would free up two buttons immediately below my movement keys, thus allowing me to map those keys to my weapons. :slight_smile:

Who knows? Maybe this could eventually become an all-out mod attempt…


(kevinski) #2

Oh, and sorry if this isn’t posted on the correct forum. I figured it dealt with editing ET, so it probably wasn’t meant for the General Discussion board.


(Fusen) #3

Kendle will most likly be your main man here but 4Newbies is a good site for some basic scripting if you search the forum for ‘4Newbies’ you’ll find the link


Washington medical marijuana


(sock) #4

This is not map editing but game scripting, tweaking. Wrong forum, moved to general.

Sock
:moo:


(Lagger) #5
bind mwheelup "vstr foo"
bind mwheeldown "vstr bar"

set stand "-movedown;-prone;set foo vstr prone;set bar vstr crouch"
set crouch "+movedown;-prone;set foo vstr stand;set bar vstr prone"
set prone "-movedown;+prone;set foo vstr crouch;set bar vstr stand"

vstr stand

although i didn’t test this, it should work


(kevinski) #6

And I can just put this in my config file to make it work?


(Lagger) #7

put it in autoexec.cfg placed in etmain


(squadjot) #8

i didnt test it either…but i dont think it would work tho.

For an example…how do you plan to get out of crouch position…? …u need to script every “step” being sure that it wont fuck up in game. Did u make this work?..or else i can do it.


(kevinski) #9

Well, it works…for the most part. Unfortunately, not exactly as I wanted it to. First off, yes, it allows you to stay crouched without holding a button down, but it doesn’t allow you to get out of the crouching stance by simply pressing jump as I’m used to. When you press jump, it stands you up, but only if you hold the button. Once you release jump, it makes you crouch again. If possible, I’d rather be able to get out of the crouching (and maybe even prone) stance by pressing jump. Secondly, going prone doesn’t work correctly. It initially makes you go prone, but you then get back up, go prone again, and repeat it indefinitely. Since I don’t understand the script in general, I wouldn’t know how to correct this.


(chavo_one) #10

Try this. I haven’t tested it though. It assumes you bind jump to the
spacebar. If you don’t, replace SPACE with the proper key.


bind SPACE "-movedown; -prone; +moveup"
bind mwheelup "vstr foo" 
bind mwheeldown "vstr bar" 

set stand "-movedown;-prone;set foo vstr prone;set bar vstr crouch" 
set crouch "+movedown;set foo vstr stand;set bar vstr prone" 
set prone "+prone;set foo vstr crouch2;set bar vstr stand" 
set crouch2 "-prone;set foo vstr stand;set bar vstr prone"

vstr stand


(kevinski) #11

I think I understand why the prone portion is messed up, although I don’t know how to fix it. Since the prone key is already a toggle key, isn’t using +prone basically the same as holding the prone key in? How would you change that command to simply execute the prone command once? I’m honestly trying to figure things at http://www.planetwolfenstein.com/4newbies/, but it’s really confusing for me. It isn’t exactly described clearly, at least for a newbie like me.


(kevinski) #12

bind SPACE "-movedown; -prone; +moveup"
bind mwheelup "vstr foo"
bind mwheeldown "vstr bar"

set stand "-movedown;-prone;set foo vstr prone;set bar vstr crouch"
set crouch "+movedown;set foo vstr stand;set bar vstr prone"
set prone "+prone;set foo vstr crouch2;set bar vstr stand"
set crouch2 "-prone;set foo vstr stand;set bar vstr prone"

vstr stand

This one is more problematic than the first. Instead of crouching when you cycle through to the crouching portion, it makes you jump. Why, I wouldn’t know. Anyway, I still have the same problems with the prone portion. It keeps going prone, getting up, going prone, getting up, and so on.


(kevinski) #13

Oh, and pressing the crouch key with the last script causes me to jump, not crouch. :???:


(chavo_one) #14

oh well. It was an academic guess. :???:


(Ifurita) #15

Your probably need to write the script as a 3-position toggle with the space bound to jump, -movedown, and a reset script to reset your 3-position toggle.


(kevinski) #16

I would…if I knew how to script. As I said, I’m trying to understand it, but it honestly doesn’t entirely make sense to me. Would someone please explain the above scripts in detail? That scripting tutorial I was reading through doesn’t explain things in terms that I can understand entirely.

set [scriptline(n)] “[command]; set [nextscriptline] vstr [scriptline(n+1)]; echo [comment]”

  1. The set command tells RTCW that you are defining a line of commands that will be grouped and executed under the name [scriptline].

  2. [scriptline(n)] - is the name of one iteration or step in your script. If you have a large number of steps, start numbering with 1. If you have 4 steps, then the highest number should be 4. For scripts with a small number of steps, you can use simple names, just make sure that you don’t use the same name twice.

  3. [command] - is the command or set of commands you want to execute with the script. Multiple commands should be separated by a semicolon ( ; ) like we learned in the Multiple Binds section.

  4. set [nextscriptline] - this tells the script to assign [nextscriptline] to execute the string of commands defined in [scriptline(n+1)]

  5. vstr [scriptline(n+1)] - is the name of the next alias in the sequence to be activated. Look at the weapon scripts. In the first iteration, I want to choose the SMG, but in the second, I want to reverse the sequence and choose the pistol. In your last iteration, make n=1 to start all over from the beginning. This will let your key cycle through all of the combinations you’ve written, then start all over from the beginning. You don’t have to use a numerical sequence, but it might make it easier to keep track of. In any case, pick whatever you’re comfortable with.

  6. echo [comment] - Any text that follows the echo command will be shown to you as an in-game message. I find this useful for reminding me what my script just did.

My head spins just thinking about it. sigh


(KingJackaL) #17

My binds config ( not including graphical tweaks, nor my spawn-timer script ) weighs in @ 11.9kB… so guess how tweaked my controls are :smiley:

I think I’ve got like 3 or 4 keys left at default - most everything else has changed. And in-game I think there’s only a few keys out of the 104 that DON’T do something unique :|.

<-- phr33|<


(kevinski) #18

Well, once I learn how to script properly, I think my controls are gonna be much more simplified in terms of how many keys I’ll be using. I’m interested in forming a clan, and I think optimizing my controls now is probably one of the most vital things I could do. I get killed far too often by using the mouse wheel to cycle through my weapons. Using the mouse wheel to adjust my stance instead is a good move toward weening myself off of mouse wheel weapon management.


(kevinski) #19

Here’s another script tutorial page, which - in my opinion - is a little easier to understand:

http://www.planetwolfenstein.com/chiffriermaschinen/tutorials.asp

Just found it. :slight_smile:


(Ifurita) #20

set gamename1 “name ^2Mr.Pickles; set nextname vstr gamename2; Echo Mr. Pickles”
set gamename2 “name ^1Hot^vCross^yBunny; set nextname vstr gamename3; echo Hot Cross Bunny”
set gamename3 “name ^2^^0WJ^2|^7Ifurita; set nextname vstr gamename4; echo Ifurita”
set gamename4 “name ^4Alpha^3Lemming; set nextname vstr gamename1; echo Alpha Lemming”
set nextname “vstr gamename1”
bind x “vstr nextname”

there is a 4-part toggle that changes names written along the lines of the tutorial.

  1. Each line is identified by a specific name, indicated by the set command
  2. Each line of name script is sequentially numbered, my convention, to make it easier to follow.
  3. Following the name of the script line (or line of script) are the commands I want executed. In this case, it’s just a name command
  4. Each line of script is ended by 1) an echo command to tell me what I’m changing my name to and 2) a set nextname … argument to rebind my key to execute the next sequential line of script