home *** CD-ROM | disk | FTP | other *** search
- property pSp, pLoc0, pStart
-
- on exitFrame me
- if pStart = 0 then
- exit
- end if
- xx = random(2)
- if xx = 2 then
- pPosuv = 1
- end if
- if xx = 1 then
- pPosuv = -1
- end if
- sprite(pSp).locV = sprite(pSp).locV + pPosuv
- if (sprite(pSp).locV - pLoc0) > 2 then
- sprite(pSp).locV = sprite(pSp).locV - 1
- end if
- if (pLoc0 - sprite(pSp).locV) > 2 then
- sprite(pSp).locV = sprite(pSp).locV + 1
- end if
- end
-
- on beginSprite me
- pSp = me.spriteNum
- pStart = 0
- end
-
- on vychoziPoloha me
- pLoc0 = sprite(pSp).locV
- pStart = 1
- end
-
- on stopTreseni
- pStart = 0
- end
-