Hi All,
I have been trying to figure something out for the past few days, I'm stuck. I am working on a very simple typing program, and I would like my sprite to move as if they are falling down from the sky. Ok I got them to do that, but I can't for the life of me get them to fall a couple seconds apart... One sprite will move down the screen but I cant get the others to move with is sequencially. Instead sprite2 waits for sprite1 to finish moving before it will move. Am I making sense? How can I cause them to fall together just slightly delayed?
Here is a copy of the code
Method Main()
sETWINDOWTITLE( "Little Miss Muffet")
Hidetoolbar()
MAximize()
Define A As Sprite
Define B As Sprite
Define C As Sprite
Define D As Sprite
Define E As Sprite
Define F As Sprite
Define G As Sprite
Define MyPen As Pen
Define Back As sprite
Back.Load( "tree.png" )
Back.Opacity = 90
Back.scale(165, 155)
Back.Show()
A.Load( "spiderdownA.png" )
A.MoveTo( 50, 0 )
A.MakeTransparent (WHITE)
A.Scale (60, 60)
A.Show()
B.Load( "SPIDERDOWNB.PNG" )
B.MoveTo( 300,0 )
B.MakeTransparent (WHITE)
B.Scale (60, 60)
C.Load( "SPIDERDOWNC.PNG" )
C.MoveTo ( 500,0 )
C.MakeTransparent (WHITE)
C.Scale (60, 60)
D.Load( "SPIDERDOWND.PNG" )
D.MoveTo (800,0 )
D.MakeTransparent (WHITE)
D.Scale (60, 60)
E.Load( "SPIDERDOWNE.PNG" )
E.MoveTo (350,0)
E.MakeTransparent (WHITE)
E.Scale (60, 60)
F.Load( "SPIDERDOWNF.PNG" )
F.MoveTo (100,0)
F.MakeTransparent (WHITE)
F.Scale (60, 60)
G.Load( "SPIDERDOWNG.PNG" )
G.MoveTo (400,0)
G.MakeTransparent (WHITE)
G.Scale (60, 60)
MyPen.Color = Black
MyPen.LineWidth = 5
MyPen.MoveTo(105,20)
Define AY As Integer
For AY = 1 To 400
Delay(25)
A.MoveTo( 50, AY)
MyPen.DrawTo (105, AY)
If IsKeyDown("A") Then
A.Hide ( )
End If
Next
B.Show()
Define BY As Integer
For BY = 1 To 400
Delay(25)
B.MoveTo( 300, BY)
If IsKeyDown("B") Then
B.Hide ( )
End If
Next
C.Show()
Define CY As Integer
For CY = 1 To 400
Delay(25)
C.MoveTo( 500, CY)
If IsKeyDown("C") Then
C.Hide ( )
End If
Next
D.Show()
Define DY As Integer
For DY = 1 To 400
Delay(25)
D.MoveTo( 500, DY)
If IsKeyDown("D") Then
D.Hide ( )
End If
Next
E.Show()
Define EY As Integer
For EY = 1 To 400
Delay(25)
E.MoveTo( 500, EY)
If IsKeyDown("E") Then
E.Hide ( )
End If
Next
F.Show()
Define FY As Integer
For FY = 1 To 400
Delay(25)
F.MoveTo( 500, FY)
If IsKeyDown("F") Then
F.Hide ( )
End If
Next
G.Show()
Define GY As Integer
For GY = 1 To 400
Delay(25)
G.MoveTo( 500, GY)
If IsKeyDown("G") Then
G.Hide ( )
End If
Next
End Method
End Program