CubeScript : problem with sleep
#9
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".
Thanks given by:


Messages In This Thread
CubeScript : problem with sleep - by Ashxelor - 18 Feb 13, 05:30PM
RE: CubeScript : problem with sleep - by Vermi - 18 Feb 13, 11:35PM
RE: CubeScript : problem with sleep - by Bukz - 19 Feb 13, 04:04AM