Posts: 16
Threads: 2
Joined: May 2012
Hi everyone,
Do you know why
works, and why
doesn't ?
Baruch
Posts: 582
Threads: 11
Joined: Aug 2011
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
Nope doesn't work either with bind.
Posts: 582
Threads: 11
Joined: Aug 2011
18 Feb 13, 06:09PM
(This post was last modified: 18 Feb 13, 06:12PM by Edward.)
yeah I mean
will work but
bind MOUSE1 [attack;jump; sleep 1000 [jump]]
wont
dunno ask 888 :p
Posts: 16
Threads: 2
Joined: May 2012
Yes, it seems sleep doesn't take movement instructions as arguments.
Posts: 756
Threads: 53
Joined: Nov 2011
(18 Feb 13, 06:19PM)Ashxelor Wrote: Yes, it seems sleep doesn't take movement instructions as arguments.
Rather, some functions explicitly check to see if their associated key is pressed or not.
Posts: 3,462
Threads: 72
Joined: Jun 2010
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
give that script an ambien!
Posts: 1,331
Threads: 44
Joined: Jun 2010
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".
Posts: 2,067
Threads: 11
Joined: Jun 2010
(18 Feb 13, 11:35PM)Vermi Wrote: give that script an ambien!