Posts: 582
Threads: 11
Joined: Aug 2011
Thanks: 0
Given 0 thank(s) in 0 post(s)
18 Feb 13, 05:33PM
(This post was last modified: 18 Feb 13, 05:44PM by Edward.)
you have to bind it I think. It doesn't work to avoid some scripts (not sure). It's not perfect btw (see the hax jump bind)
Posts: 16
Threads: 2
Joined: May 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
Nope doesn't work either with bind.
Posts: 16
Threads: 2
Joined: May 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
Yes, it seems sleep doesn't take movement instructions as arguments.
Posts: 3,462
Threads: 72
Joined: Jun 2010
Thanks: 5
Given 3 thank(s) in 3 post(s)
Movement functions will only work when used in a bind. There is more complexity to this, but its about right.
Posts: 739
Threads: 20
Joined: Jun 2010
Thanks: 0
Given 6 thank(s) in 3 post(s)
give that script an ambien!
Posts: 1,331
Threads: 44
Joined: Jun 2010
Thanks: 13
Given 10 thank(s) in 8 post(s)
19 Feb 13, 04:04AM
(This post was last modified: 19 Feb 13, 04:50AM by Bukz.)
Felix and Ronald_Reagan are right, movement functions/weapon switches/etc. only work when used with a keybind. So if you put any of those into a sleep (even if the sleep itself is keybound) it won't work.
Ex:
[cubescript]bind W [sleep 0 forward] // not gonna work with vanilla clients
bind W forward // should work fine
bind J [weapon 1; onrelease [weapon (currentprimary)]] // switches to pistol fine, but never switches back to primary onrelease[/cubescript]
Movement functions/weapon switches and such must be executed as the result of pressing a keybind to work. (i.e. instantaneously) By putting them into a sleep/onrelease it breaks that "rule".