Two examples:
First:
set knifetoggle1 "ut_weaptoggle knife; set knifetoggle vstr knifetoggle2;"
set knifetoggle2 "ut_weaptoggle primary; set knifetoggle vstr knifetoggle1;"
set knifetoggle "vstr knifetoggle1"
bind MOUSE4 knifetoggle
Well, nothing happens when I press that button
Next:
set zoomtoggle1 "cg_zoomfov 90; set nextzoomtoggle vstr zoomtoggle2; echo 6x magnification"
set zoomtoggle2 "cg_zoomfov 110; set nextzoomtoggle vstr zoomtoggle1; echo 3x magnification"
set nextzoomtoggle "vstr zoomtoggle1"
bind l "vstr nextzoomtoggle"
Again, nothing happens when I press the small L. Only a message is printed in console "6x magnification" or "3x magnification"
Advertisement
Page 1 of 1
Why don't my recursive scripts work?
#2
Posted 03 December 2010 - 01:15 AM
pollofeliz, on 03 December 2010 - 12:09 AM, said:
First:
set knifetoggle1 "ut_weaptoggle knife; set knifetoggle vstr knifetoggle2;"
set knifetoggle2 "ut_weaptoggle primary; set knifetoggle vstr knifetoggle1;"
set knifetoggle "vstr knifetoggle1"
bind MOUSE4 knifetoggle
set knifetoggle1 "ut_weaptoggle knife; set knifetoggle vstr knifetoggle2;"
set knifetoggle2 "ut_weaptoggle primary; set knifetoggle vstr knifetoggle1;"
set knifetoggle "vstr knifetoggle1"
bind MOUSE4 knifetoggle
It should be:
bind MOUSE4 "vstr knifetoggle"
pollofeliz, on 03 December 2010 - 12:09 AM, said:
set zoomtoggle1 "cg_zoomfov 90; set nextzoomtoggle vstr zoomtoggle2; echo 6x magnification"
set zoomtoggle2 "cg_zoomfov 110; set nextzoomtoggle vstr zoomtoggle1; echo 3x magnification"
set nextzoomtoggle "vstr zoomtoggle1"
bind l "vstr nextzoomtoggle"
set zoomtoggle2 "cg_zoomfov 110; set nextzoomtoggle vstr zoomtoggle1; echo 3x magnification"
set nextzoomtoggle "vstr zoomtoggle1"
bind l "vstr nextzoomtoggle"
The script is technically correct, so is you bind this time. But you had the cvar name incorrect. Should be cg_fov, not cg_zoomfov. You cannot change the fov when actually scoped in with any of the scoped weapons.
Also, you should change the "echo" into "ut_echo" if you wish to see that line show up other than just in the console only.
#3
Posted 03 December 2010 - 09:00 AM
As an aside, those scripts aren't technically recursive.
I just crashed UrT with this:
set hello "ut_echo HELLO; vstr hello"
bind X "vstr hello"
and it didn't echo HELLO even once :(
I just crashed UrT with this:
set hello "ut_echo HELLO; vstr hello"
bind X "vstr hello"
and it didn't echo HELLO even once :(
[img]http://i32.tinypic.com/242x6z5.png[/img]
#5
Posted 13 December 2010 - 12:17 AM
pollofeliz, on 03 December 2010 - 12:09 AM, said:
set knifetoggle1 "ut_weaptoggle knife; set knifetoggle vstr knifetoggle2;"
set knifetoggle2 "ut_weaptoggle primary; set knifetoggle vstr knifetoggle1;"
set knifetoggle "vstr knifetoggle1"
bind MOUSE4 knifetoggle
set knifetoggle2 "ut_weaptoggle primary; set knifetoggle vstr knifetoggle1;"
set knifetoggle "vstr knifetoggle1"
bind MOUSE4 knifetoggle
is totally unnecessary
just do:
bind MOUSE4 "ut_weaptoggle primary knife"
-iBakedUsomeCookies
[img]http://cache.www.gam...FFFF_000000.png[/img]
[img]http://cache.www.gam...FFFF_2E3226.png[/img]
[img]http://cache.www.gam...FFFF_000000.png[/img]
[img]http://cache.www.gam...FFFF_2E3226.png[/img]
Advertisement
Page 1 of 1
1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users
Advertisement