Seems this function isnt working...value always 0
hello=GENSPRITE()
hello2=GENSPRITE()
hello3=GENSPRITE()
PRINT hello3,10,10
SHOWSCREEN
MOUSEWAIT
results:
hello3=0
No, it's OK. Because you didn't acutally create a sprite on that slot.
Oh i see, you must immediately use the value or it resets, you cant just use it sequentially.
Thanks!
Thats right - it will only increase when you actually load a sprite.
I would guess GENSPRITE() Just goes thru the sprites and checks what sprite numbers don't hold a sprite yet and gives you that number. If you don't use it you will just end up with the same number next time you ask for a free number.