more help on sprites
Author |
Message |
metachief
![](http://compsci.ca/v3/uploads/user_avatars/59969875948ed1e6be9fb0.jpg)
|
Posted: Mon Feb 04, 2008 10:09 pm Post subject: more help on sprites |
|
|
how do i tell turing that is a key is not pressed to esit a loop?
for example in my code:
loop
Input.KeyDown (key)
if key ('a') then
loop
right := false
left := true
Pic.Draw (pic1l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
Pic.Draw (pic2l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
Pic.Draw (pic3l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
Pic.Draw (pic4l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
Pic.Draw (pic5l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
Pic.Draw (pic6l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
Pic.Draw (pic7l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
Pic.Draw (pic8l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
Pic.Draw (pic9l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
Pic.Draw (pic10l, round (x - 70), round (y), picMerge)
x := x - run_s
delay (60)
View.Update
cls
end loop
end if
i want it to exit when the a key is not pressed but i don't know how to make that if statement.
how do i say to turing that is a is not pressed exit the loop? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
|
|
|
![](images/spacer.gif) |
Mackie
![](http://compsci.ca/v3/uploads/user_avatars/217548454cee912ae1202.png)
|
Posted: Mon Feb 04, 2008 11:55 pm Post subject: Re: more help on sprites |
|
|
Here:
Turing: | if not key('a') then |
Thats what Tony meant. |
|
|
|
|
![](images/spacer.gif) |
|
|