Odd Request: Beta Test My ET Script :P


(kevinski) #1

I’m having slight problems with a script I recently ‘completed’. At first, it seemed to be completely functional. Problem is, it seems to mess up at times, although I’m unsure of what causes it. First off, here’s the script:

seta cg_weaponcycledelay 250 //Mouse Wheel Response Time (milliseconds)

bind space "vstr spcbr"
bind mwheelup "vstr north"
bind mwheeldown "vstr south"

set c2p "-movedown; +prone; -prone; set north vstr p2c; set south vstr p2s; set spcbr vstr p2s"
set c2s "-movedown; set north vstr s2p; set south vstr s2c; set spcbr vstr jump"
set p2c "+prone; -prone; +movedown; set north vstr c2s; set south vstr c2p; set spcbr vstr c2s"
set p2s "+prone; -prone; -movedown; set north vstr s2p; set south vstr s2c; set spcbr vstr jump"
set s2c "+movedown; set north vstr c2s; set south vstr c2p; set spcbr vstr c2s"
set s2p "+prone; -prone; set north vstr p2c; set south vstr p2s; set spcbr vstr p2s"
set jump "+moveup; wait; wait; -moveup"

vstr c2s

Secondly, a description: Basically this script allows you to toggle through the standing, crouching, and prone positions with the mouse wheel. From a standing position, mwheelup causes you to go prone, while mwheeldown causes you to crouch. From a crouching position, mwheelup causes you to stand up, while mwheeldown causes you to go prone. From a prone position, mwheelup causes you to crouch, while mwheeldown causes you to stand up.

Note that you can also stand up from a crouching or prone position by pressing the spacebar, which toggles between jumping and standing. :slight_smile:

Like I said, it seemed to work just fine. Problem is, it acts up at times. Sometimes, it won’t allow you to crouch. It’ll skip crouching completely, going from standing to prone (instead of standing to crouching) or from prone to standing (instead of prone to crouching). Other times, it skips going prone. Sometimes, pressing the spacebar makes you go prone.

It seems to act up most after having moved around a lot, for some reason. Try jumping around and whatnot, scaling walls, whatever. I can’t figure out what causes this script to spaz. It’s my first script, so it’s bound to have flaws at first. shrug


(IPvD) #2

I really don’t mean to be acid, but this is just like 10 lines user commands… what is there to beta test about keybindings?


(kevinski) #3

Well, logically, the script makes perfect sense, and it seems to work pretty well when you’re not making crazy movements. The purpose of this is to figure out what’s making the script act up, as well as how to fix it.


(kevinski) #4

You know what? I actually just thought of something. Doesn’t ET have a little glitch (?) of sorts that causes you to stand up automatically upon running into something when prone? That little issue is probably the cause of my problems, since - upon standing up after running into something - the bindings probably get screwed up. I think I need to get more redundant in my scripting in order to make sure everything operates smoothly, despite this minor issue.


(IPvD) #5

That’s super. I’ll be waiting breathless for further developments!


(Kendle) #6

The problem with the script kevinski, is that it’s not necessary, like most scripts. Without wishing to throw cold water on your efforts I do feel kinda compelled to offer some advice.

I’m a programmer by trade, so when I started playing RTCW 2 years ago and discovered it had a scripting language I took to it like a duck to water. True, it’s not a proper programming language in that it doesn’t have conditional statements (if…then…else) and doesn’t respond to events, but you can do some pretty complex stuff with it if you want to.

The problem is, whatever you can do with scripting you can almost certainly do better without. I used to have scripts for everything, complex weapon toggles, jump scripts, multi-action keys, etc. Now I don’t use any scripts except Class selection.

Take your script as an example. You’re using 3 keys (mwheelup, mwheeldown and space) to perform 3 actions, crouch, prone and jump. How about:-

bind x “+movedown”
bind y “+prone”
bind z “+moveup”

There you go, problem solved. Using standard key binds you don’t have to go through crouch to get to prone, or vice versa, or worry about hitting walls screwing up your script and each key consistently performs the same action, everytime. In fact you can use just 2 keys, as crouch + double-tap forward makes you go prone (I don’t have a key bound to prone at all for that reason).

Like I say, I don’t mean to discourage you, but more often than not scripting isn’t the answer to anything. Standard key binds and practise are almost always a better solution.


(Loffy) #7

Hi!
It’s fun to script though and it’s cool that you experiment with scripting.
However, I don’t have too many scripts anymore. As I got more and more involved in clanmatches, I got rid of the unnecessary stuff.

I agree.

Same here.

Yup. I also have a time script, which prints “enemy spawns at xx and xx” if I enter two digits. Great for letting your teammates know when NOT to run via axis spawn towards the wooden stair up to commandpost and the north gun.

Less is more.
//Loffy


(SCDS_reyalP) #8

agree 100% with kendle.

IMO, scripts like that aren’t worth the trouble. Anything which depends on state (i.e. it knows if you are prone or crouched or standing) will mess up when outside events put you in the wrong state. Better to have one key do one thing, and do it right every time.

Multiple actions in the same bind also tend to require frame rate dependant wait times.


(pgh) #9

Or you could have only one key bind and save the hassle :stuck_out_tongue: - binding a a key to Crouch and enabling double press goes prone (Options somewhere) then all you need is one to crouch/prone and you just use your jump key to stand up :slight_smile: - only thing it doesnt do is go from prone to crouch but just hold crouch when u press jump? :smiley: Simple.


(kevinski) #10

Maybe I could use something more simple like:

bind mwheeldown "+prone"
bind mwheelup "vstr stance"
bind space "vstr spcbr"

set stand "-movedown; set stance vstr crouch; set spcbr vstr jump"
set crouch "+movedown; set stance vstr stand; set spcbr vstr stand"
set jump "+moveup; wait; wait; -moveup"

Honestly, I’d prefer that the crouch function become a toggle key. That, at the very least, is the reason I wanted to figure out how to customize (and optimize) my controls through scripting.


(squadjot) #11

i have “press’n’hold” crouch on ctrl
and “toggle crouch” on alt

I agree with scripting in general…always remeber its supposed to make ur gameplay better/easier more affordable.

Scripts like “nade script”…and “medic script” are useless imo.

I have following minor scripts:

Demotoggle
class script
spawnpointscript
some-custom-say’s
Fov Toggle
Crosshaircycle
Mousewheel minimap zoom , pickup, snipescope - combo
Sniper script


(pgh) #12

Any chance of look at the Mousewheel toggle script? Got everything else… Im guessing the Sniper script is just similar to this but with a more sens zoom?


(Gump) #13

Your problem is using the wheel. Generally when you press the wheel in a direction it often registers more than one actual wheel up or wheel down. Chances are your pushing down to crouch and it’s picking up 2 or more downs and sending you prone.

The reason this doesn’t cause a problem with weapons is because weaponcycledelay is greater than 0 and it blocks out the additional registered wheel moves.

I previously messed around with some rather complex scripts to cut out the unneccesary weapons on the default wheel, just leaving the pertinent ones on. It was a pretty complex script and required me to set weaponcycledelay to 0 and the results were bad. The script worked fine but I’d always end up over wheeling and blowing by the weapon I wanted. I finally simplified to where up gives me one weapon and down gives me a different weapon. That way when I hit up, if it registers more than 1 up I still end up with the up weapon and so on.

If I were you, I’d scrap the idea.


(pgh) #14

Its like watching a first timer (n00b! :D) playing Q3OSPClan Arena or even TDM/CTF. You can always tell who has mwheels on weap selects as it takes them half an hour to go from Machine Gun/GL to Rail/Shaft/Plasma/RL. :smiley:

@Kev: As Gump suggested tho, scrap it.