Help with spinning wheel plz
Author |
Message |
Arv123
|
Posted: Tue Apr 10, 2007 5:57 pm Post subject: Help with spinning wheel plz |
|
|
i need help making the spinning wheel turn.I tried doing it but it issnt working. Please help and thx
%Windmill
drawfillbox (340, 330, 360, 200, brown)
drawfillstar (300, 300, 400, 400, 1)
delay (1000)
drawfillbox (340, 330, 360, 200, brown)
drawfillstar (330, 350, 600, 250, 1)
for d : 1 .. 90 by 10 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Arv123
|
Posted: Tue Apr 10, 2007 6:01 pm Post subject: Re: Help with spinning wheel plz |
|
|
o ya it is actually windmill so i just need help maing it turn with delay command. |
|
|
|
|
|
Geostigma
|
Posted: Tue Apr 10, 2007 6:50 pm Post subject: RE:Help with spinning wheel plz |
|
|
Well for starters that isn't going to work. you can cheese the movement by making multiple drawfillbox's that are cleared and redrawn in different x y pos so its like a frame by frame animation
for d : 1..90 by 10 isn't going to do much of anything. other then run a empty loop 9 times (assuming you closed the loop properly.) I suggest learning about loops in the Turing Walkthrough or search the forms. Then from that point you need to learn more about graphics and about various functions like View.Update and cls. |
|
|
|
|
|
CodeMonkey2000
|
Posted: Tue Apr 10, 2007 6:53 pm Post subject: RE:Help with spinning wheel plz |
|
|
You probably could do this with trig. And you can't rotate boxes like by changing the x,y coordinates. I would play around with Pic.New and Pic.rotate. |
|
|
|
|
|
Geostigma
|
Posted: Tue Apr 10, 2007 6:56 pm Post subject: Re: RE:Help with spinning wheel plz |
|
|
CodeMonkey2000 @ Tue Apr 10, 2007 6:53 pm wrote: You probably could do this with trig. And you can't rotate boxes like by changing the x,y coordinates. I would play around with Pic.New and Pic.rotate.
Hey, it works if its a 2 frame animation! |
|
|
|
|
|
ericfourfour
|
Posted: Tue Apr 10, 2007 9:15 pm Post subject: RE:Help with spinning wheel plz |
|
|
Some simple trig should do the trick. Just translate to the origin, rotate around it, and translate back. |
|
|
|
|
|
rollerdude
|
Posted: Mon Apr 16, 2007 10:16 am Post subject: Re: Help with spinning wheel plz |
|
|
i agree, trig would work, but it would take a lot of time remebering where each blade is. i would draw the baldes in paint(just the blades and not the tower part) put the backround as black...
Turing: |
View.Set("offscreenonly")
var bladepic: int:= Pic.FileNew("blades.bmp")
Pic.SetTransparentColor(black) %have the backround as black, or put backroundcolor
%here
var rotatedblade: array 1.. 35 of int
for i: 1.. 35
rotatedblade (i ):= Pic.Rotate(bladepic,i* 10, 1, 1)
end for
loop
Pic.Draw(bladepic, 1, 1, picMerge)
View.Update
delay(50)
for i: 1.. 35
cls
Pic.Draw(rotatedblade (i ), 1, 1, picMerge)
View.Update
delay(50)
end for
end loop
|
|
|
|
|
|
|
|
|