how to use hasch?
Author |
Message |
Luffy123
|
Posted: Sun May 13, 2012 2:50 pm Post subject: how to use hasch? |
|
|
So my program it needs to draw a heart and then when hasch it needs to continue and then erase the heart. So this is what I got so far.
heartObj -> draw
loop
delay (100)
exit when hasch
end loop
heartObj -> erase
Now my question is. Do I need to loop?
is there a way I can just wait until hasch to move on? or do i need to use a loop? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Amarylis
|
Posted: Sun May 13, 2012 3:04 pm Post subject: RE:how to use hasch? |
|
|
you dont need that delay there...
What hasch does is that it checks to see if a key (any key) has been pressed. It'll return as true if there was a key pressed, and false otherwise (hence why you can use it on the exit when statement).
If your objective is to just wait until they have pressed something, then yes, just loop and exit when hasch |
|
|
|
|
![](images/spacer.gif) |
Raknarg
![](http://compsci.ca/v3/uploads/user_avatars/3745510004d8be6689b92f.jpg)
|
Posted: Sun May 13, 2012 6:08 pm Post subject: RE:how to use hasch? |
|
|
Or use Input.Pause, no loop is needed |
|
|
|
|
![](images/spacer.gif) |
|
|