Computer Science Canada Turing: controlling the movement of a picture |
Author: | kirbyeatu [ Wed May 29, 2013 6:39 pm ] | ||
Post subject: | Turing: controlling the movement of a picture | ||
Can someone explain how to make a picture you have put in your program, move? <Replace all the <> with your answers/code and remove the <>> What is the problem you are having? <Answer Here> Describe what you have tried to solve this problem <Answer Here> Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using <Answer Here> |
Author: | Nathan4102 [ Wed May 29, 2013 6:41 pm ] |
Post subject: | RE:Turing: controlling the movement of a picture |
What's your question? |
Author: | kirbyeatu [ Wed May 29, 2013 6:54 pm ] |
Post subject: | RE:Turing: controlling the movement of a picture |
What i mean is, if i input a picture into my program using the "PicDraw" function, how do i make that image move. And by move, i mean how do i assign the arrow keys to move it? |
Author: | Nathan4102 [ Wed May 29, 2013 7:12 pm ] |
Post subject: | RE:Turing: controlling the movement of a picture |
In the turing docs (http://compsci.ca/holtsoft/doc/), look up: Input.Keydown Pic.Draw cls View.Set (offscreenonly section) View.Update The input.Keydown page should give you a good idea on how to use arrow keys to do things. Then, to animate the picture, follow this format: loop calculate new picture coords draw picture View.Update cls end loop Let me know if you have more questions! |
Author: | kirbyeatu [ Wed May 29, 2013 7:17 pm ] |
Post subject: | RE:Turing: controlling the movement of a picture |
Thank you so much. This is working! |