using "wait" in an "alias"
Post Reply
Quote
Re: using "wait" in an "alias"
Posted by ===PsYchOsIs=== on Sat Apr 29th at 12:48pm 2006


Um, hello there. I was working on a custom command in Counter-strike: Condition Zero using this format:

alias <keyword> "sv_gravity 100;wait 500;sv_gravity 999999;wait 5;sv_gravity 800"

For some reason though, it doesn't wait at all. Can someone tell me what I'm doing wrong??




Quote
Re: using "wait" in an "alias"
Posted by MadMan on Sat Apr 29th at 1:35pm 2006


you sure it doesn't wait? its in ms, so that wait should be 0.5 seconds.. proabably too fast to notice

[Edit] - and should it be g_gravity?





Quote
Re: using "wait" in an "alias"
Posted by Fjorn on Sun Apr 30th at 10:09am 2006


I hate admins with aliases like that


Signature? What signature!?



Quote
Re: using "wait" in an "alias"
Posted by Paladin on Sun Apr 30th at 5:52pm 2006


wait doesnt work that way, you can't use it like "wait 500".
wait has always a fixed amount of time, can't remember how much it was anymore, like 10ms or so.
Use something like :

alias wa "wait"
alias wa1 "wa"
alias wa2 "wa1; wa1"
alias wa4 "wa2; wa2"
alias wa8 "wa4; wa4"
alias wa16 "wa8; wa8"
alias wa32 "wa16; wa16"
alias wa48 "wa16; wa16; wa16"
alias wa64 "wa32; wa32"
alias wa128 "wa64; wa64"
alias wa256 "wa128; wa128"

You even need to continue that system, as wa256 still only waits for a fraction of a second
This was a part of code which i used for a buyscript for cs 7.1 or so. So maybe the whole system has changed. Dunno Maybe it'll help. Otherwise check a more approriate forum than a mapping general banter one.

Greets,
Pal




Quote
Re: using "wait" in an "alias"
Posted by rs6 on Sun Apr 30th at 9:08pm 2006


I did a little research on some scripting site.

The wait command create a pause for "1 tick". This "1 tick" varies from computer to computer depending on your connection(if your writing a script for online), and computer specs. So you you don't write numbers after your waits, you just have to type a whole lot of them together.

So:

alias <keyword> "sv_gravity 100;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;sv_gravity 999999;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;sv_gravity 800"


But instead of using all of those waits, use the aliases paladin posted.





Post Reply