Urban Terror Forums: Why don't my recursive scripts work? - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Why don't my recursive scripts work? Rate Topic: -----

#1 User is offline   pollofeliz Icon

  • Account: pollofeliz
  • Joined: 18-April 10
  • Posts: 140

Posted 03 December 2010 - 12:09 AM

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"
3AKOH
(usually)

#2 User is offline   Nexu Icon

  •   clan leader   
  • Account: nexu
  • Main tag: |it|
  • Country:
  • Joined: 26-June 07
  • Posts: 4,265

Posted 03 December 2010 - 01:15 AM

View Postpollofeliz, 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

It should be:
bind MOUSE4 "vstr knifetoggle"

View Postpollofeliz, 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"

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 User is offline   postit Icon

  • Account: postit
  • Country:
  • Joined: 28-February 10
  • Posts: 76

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 :(

#4 User is offline   Furi Icon

  • Account: furi
  • Country:
  • Joined: 09-September 10
  • Posts: 57

Posted 12 December 2010 - 11:46 PM

View Postpostit, on 03 December 2010 - 09:00 AM, said:

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 :(


You kinda made it loop.

#5 User is offline   Bodhisattva Icon

  • Account: bodhisattva
  • Joined: 28-February 10
  • Posts: 809

Posted 13 December 2010 - 12:17 AM

View Postpollofeliz, 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

is totally unnecessary

just do:
bind MOUSE4 "ut_weaptoggle primary knife"

bullet_loaderAdvertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942