Type WindowHandler
X as Integer
Y as Integer
Endtype
dim WindowHandler(5) as WindowHandler
WindowHandler(1).X = 100
WindowHandler(1).Y = 100
WindowHandler(2).X = 200
WindowHandler(2).Y = 200
WindowHandler(3).X = 300
WindowHandler(3).Y = 300
WindowHandler(4).X = 400
WindowHandler(4).Y = 400
WindowHandler(5).X = 500
Thx Indi for helping me get unconfused
That code shows how to use TYPES and ARRAYS available in DBP. Use the demo if you dont have DBP. With that code 5 windows X and Y cordinates are stored in an array. In your loop generate a random seed between 1 and 5. If there are no other images on screen (use Sprites and say
For X=1 to 5
If Sprite Visible(X)<1
ScreenClear=1
Endif
Next X
That will tell you if no targets are up. Next, display a sprite at random
If ScreenClear=1
If SpriteClicked=0
If RndSeed=1
Sprite 1,WindowHandler(1).X,WindowHandler(1).Y,1
Endif
Endif
Endif
Control the clicking of the sprite using code I put in your other post....
And that should be about it. Course I didnt give you all the necessary code as that would be cheating on your course
RPGamer