home *** CD-ROM | disk | FTP | other *** search
- property MySprite, MyMem, MyType, MyH, MyV, MyStatus, MySpeed
- global MyFlip
-
- on new me, spr, Side
- MySprite = spr + 20
- MyType = #Bird
- MyMem = 175
- if Side = #right then
- MyH = (spr * (235 + random(30))) + 640 - 150
- MySpeed = 1 + random(2)
- else
- if Side = #left then
- MyH = 0 + 150 - (spr * (235 + random(30)))
- MySpeed = 1 + random(2)
- end if
- end if
- MyV = 100
- MyStatus = #normal
- sprite(MySprite).member = member(MyMem, 1)
- sprite(MySprite).loc = point(MyH, MyV)
- sprite(MySprite).flipH = MyFlip
- return me
- end
-
- on Update me
- global Scrolling, Direction, MaaierSpr, MaaierMem, MaaierStatus, TinusSpr, TinusMem, TinusStatus, TinusOnsterf
- MyH = MyH + Scrolling
- if MyStatus = #normal then
- if sprite MySprite intersects TinusSpr and (TinusStatus = #normal) and (TinusOnsterf = 0) then
- puppetSound(1, 108 + random(3))
- TinusMem = 37
- TinusStatus = #BackDrop
- MyStatus = #GetOutBird
- MaaierStatus = #RunAway
- TinusOnsterf = 100
- end if
- end if
- if MyMem > 177 then
- MyMem = 175
- else
- MyMem = MyMem + 0.29999999999999999
- end if
- if (MySprite = 50) and (MyH < -60) and (Direction = #right) and (MyStatus = #normal) then
- MyStatus = #OutScreen
- TinusStatus = #OutScreenRight
- Scrolling = 0
- else
- if (MySprite = 50) and (MyH > 700) and (Direction = #left) and (MyStatus = #normal) then
- MyStatus = #OutScreen
- TinusStatus = #OutScreenLeft
- Scrolling = 0
- else
- if MyStatus = #GetOutBird then
- MyV = MyV - 1
- if Direction = #right then
- MyH = MyH - MySpeed
- else
- if Direction = #left then
- MyH = MyH + MySpeed
- end if
- end if
- end if
- end if
- end if
- if (MyH < 700) and (MyH > -60) then
- DoBird(me, Direction)
- sprite(MySprite).member = member(MyMem, 1)
- sprite(MySprite).loc = point(MyH, MyV)
- sprite(MySprite).flipH = MyFlip
- end if
- end
-
- on stepFrame me
- Update(me)
- end
-
- on DoBird me, dir
- global Scrolling, TinusStatus
- if (dir = #right) and (TinusStatus = #normal) then
- MyH = MyH - (MySpeed / 2.0)
- if (MyH < 640) and (MyH > 200) then
- if MyV >= 275 then
- MyV = 275
- else
- MyV = MyV + ((MySpeed / 2.0) + (abs(Scrolling) / 3.0))
- end if
- else
- if MyH <= 200 then
- MyV = MyV - 1
- end if
- end if
- else
- if (dir = #left) and (TinusStatus = #normal) then
- MyH = MyH + (MySpeed / 2.0)
- if (MyH < 440) and (MyH > 0) then
- if MyV >= 275 then
- MyV = 275
- else
- MyV = MyV + ((MySpeed / 2.0) + (Scrolling / 3.0))
- end if
- else
- if MyH >= 440 then
- MyV = MyV - 1
- end if
- end if
- end if
- end if
- end
-