Random Picture Movement?
Author |
Message |
thomasrox3
|
Posted: Tue Apr 03, 2007 8:23 pm Post subject: Random Picture Movement? |
|
|
Is it possilbe to get an imaage that tweens around the screen independantly In a uniform way and not have it pop in different places? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Mazer
|
Posted: Tue Apr 03, 2007 8:38 pm Post subject: RE:Random Picture Movement? |
|
|
How about instead of setting a new position for the picture, set a target poition. If the picture is not at it's target position, have it move (in a small step) towards it. |
|
|
|
|
|
Geostigma
|
Posted: Tue Apr 03, 2007 9:13 pm Post subject: Re: Random Picture Movement? |
|
|
code: |
randint(chooser,1,4)
if chooser = 1 then
randint (tweenx, 2,maxx[or any number])
for i : 1..tweenx
cls
xpos:=xpos + 10 (or w/e number)
View.Update
end for
elsif chooser = 2 then
for i : tweenx..1
cls
xpos:=xpos - 10 (or w/e number)
View.Update
end for
|
Thats my suggestion. See if you can adapt that to ypos. You have to have your X and Y coordinates as variables for your picture |
|
|
|
|
|
thomasrox3
|
Posted: Wed Apr 04, 2007 9:56 am Post subject: RE:Random Picture Movement? |
|
|
Anyone with some more helpful info. I haven't worked with turing for months, so Im a bit rusty. |
|
|
|
|
|
Cervantes
|
Posted: Wed Apr 04, 2007 10:05 am Post subject: RE:Random Picture Movement? |
|
|
If you want more information, you'll probably have to expand on your question. What exactly is the effect you want? Maybe Brownian motion would do? |
|
|
|
|
|
|
|