home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Family Forum 256
/
DR_BRAIN.BIN
/
BUGS
/
ACT2
/
00013_Field_13.txt
next >
Wrap
Text File
|
1996-06-14
|
907b
|
22 lines
on mouseUp -- move from present location to mouseclick
set mh = the mouseh -- coordinates that we are moving towards
set mv = the mousev
set px = the loch of sprite 2 --- location where we are (sprite 2)
set py = the locv of sprite 2
set timeend = 20.0 -- this is how long we want the move to take
set xinc = (mh - px)/timeend -- how far to move per timer tick
set yinc = (mv - py)/timeend
set ptime = the timer -- grab present value for timer
repeat while the timer < ( ptime + timeend) -- repeat until timeend ticks have passed
set dtime = the timer - ptime -- time since ptime was set (begining of move)
set the loch of sprite 2 = px + (xinc * dtime)
set the locv of sprite 2 = py + (yinc * dtime)
updatestage
end repeat
set the loch of sprite 2 = mh
set the locv of sprite 2 = mv
end