flashing sprites

Blitz3D Forums/Blitz3D Beginners Area/flashing sprites

FiNegirO(Posted 2006) [#1]
Hi everybody,
I need to load flashing sprites in my 3d world (like stars, christmas lights, etc...). I read the filenames of the sprites form a file; each sprite has a different flashing time and position that I can't know until reading the file.

My problem is that I don't know how to handle the flashing behaviour: I don't want to control a timer in the main code for each sprite manually. (I don't know how many sprites there will be..) I would like each sprite has an independent flashing behaviour.

Does anybody have idea to how to do that?
I tried to use animated meshes (planes with textures) but I got some problems with transparency.

Thanks a lot,
fiNegiro


Sledge(Posted 2006) [#2]

I don't want to control a timer in the main code for each sprite manually. (I don't know how many sprites there will be..) I would like each sprite has an independent flashing behaviour.


Use types, then you won't need to know how many in advance and the flashing can be handled 'manually automatically', if you follow. Quick example that you can surely improve upon:




FiNegirO(Posted 2006) [#3]
Wonderful, I'm modifying my code this way.

Thanks Sledge