Can somebody tell me how to write this script for my autoexec.cfg?
I use "E" to run fast (sprint).
I use "CTFL" to open and close doors.
I was to make it so when I hit "E" I can run fast, but if I am at a door it will open or close it.
I tried to write this script for my autoexec.cfg, but it does not work.
bind e "+button8; +button7"
[1]I tried to base it off of my other script: bind i "ut_itemdrop flag;ut_weaptoggle bomb"
_______________________________
This example is killing me:
Here's an example for a 3x - 6x zoom toggle:
set zoomtoggle1 "cg_zoomfov 15; sensitivity 25; set nextzoomtoggle vstr zoomtoggle2; echo 6x magnification"
set zoomtoggle2 "cg_zoomfov 30; sensitivity 17; set nextzoomtoggle vstr zoomtoggle1; echo 3x magnification"
Assign dynamic variable to first 'step' in sequence: After you have finished writing the basic set of commands, use set [nextscriptline] vstr [scriptline(n+1)]
This tells the computer that [nextscriptline] should start by executing [scriptline(n+1)]. Notice however, that every time you execute your script, the value attached to [nextscriptline] changes. Here's an example for a 3x - 6x zoom toggle: set nextzoomtoggle "vstr zoomtoggle1"
Bind key to execute dynamic variable: The last step is to bind a key to execute your new script. We learned the syntax in the first step, Simple Binds. The final line in the zoom toggle looks like: Here's an example for a 3x - 6x zoom toggle:
bind b "vstr nextzoomtoggle"