home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jommeke
/
Jommeke.iso
/
movies
/
maze.dir
/
00016_Script_16
< prev
next >
Wrap
Text File
|
2000-02-23
|
703b
|
32 lines
on movemonster
global mazech,monsterch
--save the old co ords
put the loch of sprite monsterch into mx
put the locv of sprite monsterch into my
-- make random numbers in range -4 to 4
put random(9) into xx
put xx-5 into xx
put random(9) into yy
put yy-5 into yy
--work out the new position
put mx+xx into mx2
put my+yy into my2
-- set in the position
set the loch of sprite monsterch to mx2
set the locv of sprite monsterch to my2
updatestage
if sprite (monsterch) intersects sprite (mazech) then
set the loch of sprite monsterch to mx
set the locv of sprite monsterch to my
updatestage
end if
end