question about sprites

Blitz3D Forums/Blitz3D Beginners Area/question about 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.

A number of easy ways to do what you are suggesting:

I am not sure if you mean 2d or 3d so I will answer for both.

In 3d, a sprite can be given a texture (entitytexture command). Use an animated texture, basically a set of images within the main image, and when you need to change the image on the sprite simply call the entitytexture command with the appropriate frame.

In 2d a sprite/image can be drawn using a similar technique by using the loadanimimage() command. The number of 2d images that can be drawn on the screen at one time shouldn't be a problem at all, and all you have to do is change the particular frame of the image which is drawn.

Also, in answering that last question:

Variables passed through functions do not have to be global as they are accessible everywhere throughout your program. However, if your parameter in the function declaration has the same name as a global variable then changing the value of that variable within the function will not affect the global variable.