How do you go about making sprites appear at the very top of the
screen when scrolling a sprite surface downward?
Well, one easy way would be to assign someSprite.ScreenY = 0.
HTH,
-Joe
Joe:
I am still having problems with developing my game involving a
scrolling sprite surface. Below is my code contained in the NextFrame()
event:
Sub NextFrame()
SpriteSurface1.scroll,0,-2
boat.y=boat.y+2
count=count+1
if count=100 then
mount=new Sprite
mount=SpriteSurface1.newSprite(rock1,290,0)
mount.screenY=-200
SpriteSurface1.attach mount
end if
if count=400 then
mount2=new Sprite
mount2=SpriteSurface1.newSprite(rock2,350,0)
mount2.screenY=-200
SpriteSurface1.attach mount2
count=0
end if
End Sub
First off all, I need a better way to determine when it is time to have
a new mountain sprite appear.
Second, how do I keep track of when a sprite goes off the bottom of the
screen? When it does, I need to close the sprite. The way my code is
set up, the number of sprites keep growing every time count equals 100
or 400. I am using a 800x600 window & sprite surface.
Thanks
Mark
marklawrimore at earthlink dot net
- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|