View Full Version : 'wait' and 'play' console commands

04-06-2002, 12:11 PM
I've been toying around with a string of console commands to make a little sabre twirl like Obi Wan does fighting Maul in TPM (twirling it by his side when he has some distance between them), just for my own amusment.

Firstly I want to know if there's a console command to make the game play a specific sound effect. Now I've found play - play a sound file (play sound.wav) in a list of Q3 console caommnds. play is listed when you enter cmdlist in the console, but I can't get it to work.

The other thing is the wait command. It seems to last a tiny fraction of a second, where as I need a much longer pause between the other commands. Now I've managed to get the desired effect putting dozens of wait commands one after the other, but I was wondering if anyone knew a neater way to get the same effect. eg. A command similar to wait but with a pause of definable length.


04-06-2002, 12:36 PM
I haven't gotten into the console scripts for JKII, but in other QIII games, 'wait's can be stringed together if you have to. Like this:

wait; wait; wait;

The amount of time that 'wait' waits is one server cycle. Typically in QIII based games that is 20 times a second so apprx. 5ms.

- Vorax

LOL...I just saw the bottom of your message. You already know how to string them...hehehe. To answer the question there, 'wait' is the only thing you can use...as far as I know (97% sure)

04-08-2002, 07:15 AM
Hmm, well thanks anyway. It's the first time anyone's even tried to answer my question (and I've posted it on a few different JKII forums...).

04-08-2002, 07:43 AM
FYI - There is one major drawback with wait. Whilst waiting, the PC will not accept any other keyboard input, meaning if you use them in a script you will be 'locked' out of doing anything else until it is finished!;)

See for example (in multiplayer) this 'discosaber' script:

bind X "set color1 0; wait; wait; wait; set color1 1; wait; wait; wait; set color1 2; wait; wait; wait; set color1 3; wait; wait; wait; set color1 4; wait; wait; wait; set color1 5; wait; wait; wait"

Now ingame, hold down 'X' and your lightsaber will cycle through the available colors over and over again. But... release 'X' after a few seconds and all those other queued 'X's will all have to run, before you can use any other keyboard command.