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? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Mazer
![](http://compsci.ca/v3/uploads/user_avatars/1323750815476d9f446d80c.png)
|
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. |
|
|
|
|
![](images/spacer.gif) |
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 |
|
|
|
|
![](images/spacer.gif) |
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. |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
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? |
|
|
|
|
![](images/spacer.gif) |
|
|