Author |
Message |
Mr. T
![](http://www.madpaintballer.com/images/purepwnage.gif)
|
Posted: Sun Jan 30, 2005 3:52 pm Post subject: Delays |
|
|
How do you cancel a delay? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Neo
![](http://compsci.ca/v3/uploads/user_avatars/441131374462fea7633fd3.gif)
|
Posted: Sun Jan 30, 2005 3:59 pm Post subject: (No subject) |
|
|
What do you mean cancel?
If you mean take out the delay while the program is running then you could put the delay inside an if statement. |
|
|
|
|
![](images/spacer.gif) |
Mr. T
![](http://www.madpaintballer.com/images/purepwnage.gif)
|
Posted: Sun Jan 30, 2005 4:08 pm Post subject: (No subject) |
|
|
ya sorry, can u give me an example of using an if statement to stop a delay? |
|
|
|
|
![](images/spacer.gif) |
basketball4ever
|
Posted: Sun Jan 30, 2005 4:16 pm Post subject: (No subject) |
|
|
Pwned wrote: ya sorry, can u give me an example of using an if statement to stop a delay?
hmm... why would you want a delay to stop. You can set the delay right... so why would you want it to stop while the program in running... can you give like a piece of code so i can see what you're trying to do |
|
|
|
|
![](images/spacer.gif) |
person
|
Posted: Sun Jan 30, 2005 4:25 pm Post subject: (No subject) |
|
|
u can probably do:
if (something) then
x := 0
end if
delay (x) |
|
|
|
|
![](images/spacer.gif) |
Mr. T
![](http://www.madpaintballer.com/images/purepwnage.gif)
|
Posted: Sun Jan 30, 2005 4:38 pm Post subject: (No subject) |
|
|
basketball4ever wrote: Pwned wrote: ya sorry, can u give me an example of using an if statement to stop a delay?
can you give like a piece of code so i can see what you're trying to do
<<anything above needs a delay of 10>>
delay (10)
cls
delay (0)
<<anythinmg below needs no delay>> |
|
|
|
|
![](images/spacer.gif) |
basketball4ever
|
Posted: Sun Jan 30, 2005 4:45 pm Post subject: (No subject) |
|
|
k ...
so
code: | % all your code before that
var num:int
get num
if num >10 then
delay(10)
%you don't need an else delay (0) cos... thats like :? :P
end if
|
that should work fine. |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Sun Jan 30, 2005 4:51 pm Post subject: (No subject) |
|
|
Is this inside a loop? If so, chances are you should only have one delay. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Mon Jan 31, 2005 5:33 pm Post subject: (No subject) |
|
|
How about this question:
How would you let the user input something while a delay is running? |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Mon Jan 31, 2005 5:50 pm Post subject: (No subject) |
|
|
You don't. A delay is like getch: it halts the program until it's done. So, while the delay is on, the program is halted. Thus, you can't be running an Input.KeyDown line while the delay is on. |
|
|
|
|
![](images/spacer.gif) |
1337_brad
|
Posted: Mon Jan 31, 2005 6:31 pm Post subject: But... |
|
|
But a get statement would do the trick... it would delay until the user inputs a value.. or if you need the delay set to a specific time you could have the get statement and then the delay like so:
code: |
var theget : string
put "enter something here"
get theget
Time.Delay(10)
|
|
|
|
|
|
![](images/spacer.gif) |
ssr
![](http://siruisite.port5.com/ssr.jpg)
|
Posted: Mon Jan 31, 2005 8:37 pm Post subject: (No subject) |
|
|
How about just hasch
however, I got a question
ok how would u like enter a cheat while the program is running
like you can make teh program run
but if u enter something, it wont show, but it will print do the cheat after the code is fully entered |
|
|
|
|
![](images/spacer.gif) |
1337_brad
|
Posted: Mon Jan 31, 2005 9:23 pm Post subject: You would have to... |
|
|
Do it with processes... and then fork them, so that the game, and the getcheat command can run at the same time... |
|
|
|
|
![](images/spacer.gif) |
ssr
![](http://siruisite.port5.com/ssr.jpg)
|
Posted: Mon Jan 31, 2005 9:31 pm Post subject: (No subject) |
|
|
Quote:
Do it with processes... and then fork them, so that the game, and the getcheat command can run at the same time...
oh ya Thanx man, 1337_brad
helped out a lot |
|
|
|
|
![](images/spacer.gif) |
basketball4ever
|
Posted: Mon Jan 31, 2005 10:41 pm Post subject: (No subject) |
|
|
ssr wrote: Quote:
Do it with processes... and then fork them, so that the game, and the getcheat command can run at the same time...
oh ya Thanx man, 1337_brad
helped out a lot
do note that processes will cause alot of trouble.... you might wanna stay away from em... if i were you, i would just use a cheat menu... |
|
|
|
|
![](images/spacer.gif) |
|