Advertisement
Page 1 of 1
If/then Scripts
Are they possible?
#1
Posted 26 January 2013 - 12:27 AM
Hey all, trying to play around with some scripts and I'm wondering if an "if/then" script is possible.
Mainly looking for something like if I have my primary weapon selected, the script will run, and if a secondary weapons is selected the script won't run.
Is this possible? I haven't really seen any script commands like this in any example I've seen.
Thanks in advance.
Mainly looking for something like if I have my primary weapon selected, the script will run, and if a secondary weapons is selected the script won't run.
Is this possible? I haven't really seen any script commands like this in any example I've seen.
Thanks in advance.
#2
Posted 26 January 2013 - 01:34 AM
Not quite. Quake scripting is extremely limited.
However, you can switch between two (or more) behaviors with the keys you use for weapon switching, for example, changing MOUSE2 from zoom to FOV toggle and back when you switch between sniper and pistol:
bind 2 "ut_weaptoggle primary; bind MOUSE2 ut_zoomin; cg_fov 110" // reset when you switch to sniper while in FOV 90
bind 3 "ut_weaptoggle sidearm; bind MOUSE2 vstr iron"
set iron "vstr ironon"
set ironon "cg_fov 90; set iron vstr ironoff"
set ironoff "cg_fov 110; set iron vstr ironon"
However, you can switch between two (or more) behaviors with the keys you use for weapon switching, for example, changing MOUSE2 from zoom to FOV toggle and back when you switch between sniper and pistol:
bind 2 "ut_weaptoggle primary; bind MOUSE2 ut_zoomin; cg_fov 110" // reset when you switch to sniper while in FOV 90
bind 3 "ut_weaptoggle sidearm; bind MOUSE2 vstr iron"
set iron "vstr ironon"
set ironon "cg_fov 90; set iron vstr ironoff"
set ironoff "cg_fov 110; set iron vstr ironon"
dswp.de
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)
#5
Posted 26 January 2013 - 09:55 AM
baeX, on 26 January 2013 - 09:48 AM, said:
You cant bind binds. If you want the script to work you have to add two cfg's
Bollocks.
dswp.de
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)
Advertisement
#7
Posted 27 January 2013 - 01:14 AM
:-P
dswp.de
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)
Page 1 of 1
1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users
Advertisement