Sprite trails

Blitz3D Forums/Blitz3D Beginners Area/Sprite trails

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

To compare two types against each other, you could do this....



Function compareX(num,num1)
counter = 0
For a.alien = Each alien
   counter = counter + 1
   If counter = num then
      temp.alien = a.alien
   End If
   If counter = num1 then
      temp1.alien = a.alien
   End If
Next

Return temp\x - temp1\x

End Function



Then, call the "compareX(1,7)" function. Put in the numbers of the two you want to compare. so:

If compareX(2,4) = 0 then
   Print" Aliens are in the same X positions"
End If


The function basically returns the difference between the two ship numbers passed across. You could do a compareY function the same way :o)