Sprite trails

Blitz3D Forums/Blitz3D Beginners Area/Sprite trails

An array of types is handy here to start with. Although I would recommend using Object and Handle when you are familiar with them. Search the forums - there are countless explanations.

Anywho, here a simplt example of an array of types ...


Dim nasty.Alien( 20 )

for l = 0 to 20
 nasty(l) = new Alien
 nasty(l)\x = rand(-10,10)
 nasty(l)\y = rand(-10,10)
next

;just move nasty 2 and 4
nasty(2)\x = nasty(2)\x + 1
nasty(4)\x = nasty(4)\x + 10