How do I use sprites?

Blitz3D Forums/Blitz3D Beginners Area/How do I use sprites?

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.


Global burst,bursttime,burststart

Function Burst()

;load the burst sprite, position it, etc. here
burst=True
burststart=Millisecs()

End Function

Function UpdateBurstTimer(burstsprite)

If burst then

If Millisecs()-burststart>=bursttime Then

burst=False
HideEntity(burstsprite)

End if

End If

End Function



Try this; this is kinda like the code I use to calculate FPS. Just set 'bursttime' to the amount of time you want the burst to appear, and call Burst(). Then, in the loop, run this:


If burst Then UpdateBurstTimer()