Problem with making things go behind others in animations
Author |
Message |
nosnarbo
|
Posted: Sat Nov 06, 2010 5:49 pm Post subject: Problem with making things go behind others in animations |
|
|
What is it you are trying to achieve?
I am trying to make a bug fly behind a frog on the edge of the screen in an animation, making it look like it's getting eaten.
What is the problem you are having?
I am doing this for a school assignment and the teacher restricted the use of refreshing the frog. She says there is a way to do it even without refreshing, but no matter how hard i try, i can't seem to get anything to work.
Describe what you have tried to solve this problem
I've tried shrinking the bug, covering the bug and deleting the bug at the time of contact with the frog. Nothing seems to work that well.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
I'm trying to make this
Turing: |
for x : 0 .. 700
drawfillbox (- 26 + x, 313, 40 + x, 375, 115) %fly erase
drawfillarc (- 5 + x, 340, 10, 30 - x div 10, 0, 180, 0) %fly wing left
drawarc (- 5 + x, 340, 10, 30 - x div 10, 0, 180, 7) %fly wing left border
drawfilloval (0 + x, 328, 25, 15, 7) %fly body
drawfillarc (5 + x, 340, 10, 30 - x div 10, 0, 180, 0) %fly wing right
drawarc (5 + x, 340, 10, 30 - x div 10, 0, 180, 7) %fly wing right border
drawfilloval (10 + x, 330, 5, 5, 0) %fly eye
drawfillarc (630, 345, 43, 40, 238, 129, 48) %frog4
drawfilloval (630, 375, 5, 5, 7) %frog4 eye
delay (7)
end for
|
go behind this:
[syntax="turing"]
for x : 0 .. 45
drawoval (640, 345, 50, x, 48) %frog4
end for
[syntax]
Please specify what version of Turing you are using
I'm using Turing 4.0.5 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
mirhagk
|
Posted: Sat Nov 06, 2010 11:38 pm Post subject: RE:Problem with making things go behind others in animations |
|
|
well you could just check the spot where you drawing and whether it would draw over the frog. |
|
|
|
|
|
nosnarbo
|
Posted: Sat Nov 06, 2010 11:47 pm Post subject: RE:Problem with making things go behind others in animations |
|
|
i'm not sure what you mean by that. sorry i screwed up typing the ending syntax tag for the second part of the code.
but if i draw over the frog using the bug, it would leave a trail, cutting through the frog. |
|
|
|
|
|
mirhagk
|
Posted: Sun Nov 07, 2010 12:00 am Post subject: RE:Problem with making things go behind others in animations |
|
|
do you know about if statements yet? |
|
|
|
|
|
|
|