Author |
Message |
sarm2005
|
Posted: Tue Mar 11, 2008 12:50 pm Post subject: How do you write a loop that exits when any key is pressed? |
|
|
well? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
BigBear
|
Posted: Tue Mar 11, 2008 12:52 pm Post subject: Re: How do you write a loop that exits when any key is pressed? |
|
|
First I am wondering if this has to be a loop. Input.Pause waits for input then continues the program. If this isn't what you are looking for please provide more information. Hope this helps. |
|
|
|
|
 |
sarm2005
|
Posted: Tue Mar 11, 2008 1:18 pm Post subject: Re: How do you write a loop that exits when any key is pressed? |
|
|
Yeah. I need it to be a loop since I want something else to happen every so often if a key is not pressed. |
|
|
|
|
 |
Sean

|
Posted: Tue Mar 11, 2008 1:37 pm Post subject: Re: How do you write a loop that exits when any key is pressed? |
|
|
Well, a simple if statement and an Input.KeyDown is required.
You want it to detect if a key was pressed then perform this action:
It will exit when that certain button you assigned it to exit upon is pressed. |
|
|
|
|
 |
Mackie

|
Posted: Tue Mar 11, 2008 1:48 pm Post subject: RE:How do you write a loop that exits when any key is pressed? |
|
|
code: | loop
% Do stuff
exit when hasch
end loop |
Easy way. |
|
|
|
|
 |
sarm2005
|
Posted: Tue Mar 11, 2008 1:58 pm Post subject: Re: How do you write a loop that exits when any key is pressed? |
|
|
Ok. That works. Thank you. |
|
|
|
|
 |
Sean

|
Posted: Tue Mar 11, 2008 2:16 pm Post subject: Re: How do you write a loop that exits when any key is pressed? |
|
|
Mackie, I wasn't trying to give it to him, was just trying to see if he could do it  |
|
|
|
|
 |
|