Urban Terror Forums: Script Help - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Script Help Rate Topic: -----

#1 User is offline   NotVeryGood Icon

Posted 30 March 2017 - 03:01 AM

I have written a script that auto-reloads after shooting off a shot. It's intended to speed up shooting the HK69. There is also a message in the top right that tells you if it is off or on.

I'm having some trouble, though. Turning it on works fine. However, turning it off doesn't. The message still appears, but the "auto-reload" mode stays on. It doesn't change until I die. Any ideas?

Script:

//Auto reload script
bind x "vstr next_mode"
set next_mode "vstr reload_on"
set reload_off "set next_mode vstr reload_on; unbind MOUSE1; wait; bind MOUSE1 +attack; ut_echo ^6Auto Reload Mode: ^1OFF"
set reload_on "set next_mode vstr reload_off; unbind MOUSE1; wait; bind MOUSE1 +attack; wait; +button5; ut_echo ^6Auto Reload Mode: ^2ON"

This post has been edited by NotVeryGood: 30 March 2017 - 03:01 AM


#2 User is offline   brown Icon

  • Account: brown
  • Main tag: z][t-
  • Country:
  • Joined: 08-May 13
  • Posts: 21

Posted 30 March 2017 - 11:38 AM

firstly, you don't have to unbind a key while you're binding it in a moment.

secondly, when you do +attack, you have to do -attack as well.

finally, you can't bind multiple actions like you did, here's a little modification:

bind x "vstr next_mode"

set next_mode "vstr reload_on"

set reload_off "set next_mode vstr reload_on; bind MOUSE1 +attack; ut_echo ^6Auto Reload Mode: ^1OFF"

set reload_on "set next_mode vstr reload_off; bind MOUSE1 vstr temp; ut_echo ^6Auto Reload Mode: ^2ON"

set temp "+attack; wait 2; -attack; wait 2; +button5; wait 2; -button5"

This post has been edited by brown: 30 March 2017 - 11:41 AM


#3 User is offline   NotVeryGood Icon

Posted 30 March 2017 - 08:39 PM

View Postbrown, on 30 March 2017 - 11:38 AM, said:

firstly, you don't have to unbind a key while you're binding it in a moment.

secondly, when you do +attack, you have to do -attack as well.

finally, you can't bind multiple actions like you did, here's a little modification:

bind x "vstr next_mode"

set next_mode "vstr reload_on"

set reload_off "set next_mode vstr reload_on; bind MOUSE1 +attack; ut_echo ^6Auto Reload Mode: ^1OFF"

set reload_on "set next_mode vstr reload_off; bind MOUSE1 vstr temp; ut_echo ^6Auto Reload Mode: ^2ON"

set temp "+attack; wait 2; -attack; wait 2; +button5; wait 2; -button5"



Thanks!

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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