Animated Textures

One of the nice things X3D V2 (and previous versions) has, is the ability to quickly change textures, thanks to its texture library. I will show you how to make an animated surface in your game.
First, we need you to download fyad.zip, which is a folder called "fyad", and in that, a couple of textures we can animate. Stick it in your res directory (game/res/fyad/, and copy template.gm6 and xtreme3d.dll in the main directory (game/)
Remove all the stuff that you don't need in the create and step events of o_engine:
Create:
// just to see something in the template
cube=CubeCreate(1,1,1,scene);
font=WindowsBitmapfontCreate('Arial',10);
fpstext=HUDTextCreate(font,'FPS:',front);
Begin Step:
TextSetText(fpstext,'FPS: '+string(fps));
Now, create an object called o_animatedbillboard or something.
In the Create event, do this:
i = 1
// repeat this for 9 frames, since we have 9 frames
amountofframes = 9
repeat(amountofframes)
{
   // create the material, and using the variable "i" to include the frame number
   MaterialCreate("fyad"+string(i),"res\fyad\fyad"+string(i)+".jpg",0);
   i+=1
}
// sets the current frame
currentframe = 1;
// creates a plane
plane = PlaneCreate(0,100,75,1,1,o_engine.scene);
ObjectSetPosition(plane,x,40,y);
// sets the alarm 0 to 2 steps
alarm[0] = 2
This basicly loads all the textures in sequence (texture names are fyad1 till fyad9.
Now, lets create the animate part, add the alarm 0 event, and in it, a piece of code:
// add 1 to the current frame
currentframe +=1
//if the current frame has exceeded the number of frames (9 in our case), switch back to 0
if currentframe > amountofframes {currentframe = 1}
// if you would have a animation that also goes backwards, you should make one that resets it if its below the first image
// and subtract 1 instead of adding one to the currentframe variable.
// sets the current frame to the billboard
ObjectSetMaterial(plane,"fyad"+string(currentframe))
// and sets the alarm to 3 steps
alarm[0] = 3
Put the object somewhere in your room, and behold, an animated plane O_o.
If you want to have a longer animation, just add textures called fyad#.JPG in the fyad directory, and set the amountofframes variable to the number given to the latest frame. Change alarm[0] = # if you want to speed up the animation