Game Development Community

arrays of textures for projectiles?

by Anthony Rosenbaum · in Torque Game Engine · 10/22/2001 (9:27 pm) · 10 replies

is it supported in the Dev_stable version . . . like the SniperProjectileData class for the lazer beam in T2. .? Anthony

#1
10/22/2001 (9:47 pm)
Not that I know of... what are the texture array's used for? Seems like you could just animate the projectile dts shape if you wanted basic texture animation.
#2
10/22/2001 (10:18 pm)
it is an alternative to having an actualy max object being the projectile . . .with the textures you can have it be the particle like a beam (sniper rifle) or the bouncy ball of the blaster or maybe use it to makea flamethrower!!! all with greyscale images!!!
#3
10/23/2001 (2:11 am)
As you can see in this post I have a similar problem/need:

www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=2146

And in this screenshot from my project you can see my flamethrower in action:

www.flashthunder.com/gfx/flamebursts.jpg
This is done with just a single fire texture.
I have already made a animated fire texture of 6 png's and would like to use them all as it will really make this look great.

So anyone has any ideas on this let's hear them.

// Clocks out
#4
10/23/2001 (7:01 am)
clock what variable did you set the texture to . . .texturename = ". . . /texture.png"; is that the one .. . I'm not sure about animated textures but why don't play an optical effect, and in the ParticleData just alternate a series of png to give the illusion of animated textures. . . like a particle system that follows the projectile texture!!!
Anyway was "texturename" what you used? have you tried making the projectile an array?
Anthony
#5
10/23/2001 (7:30 am)
This is the 4 diff ways I have tried so far:

--------
textureName = "fps/data/textures/particles/flames";
--------
textureName = "fps/data/textures/particles/flames.ifl";
--------
textureName = "fps/data/textures/particles/flames.dml";
--------
animateTexture = true;
framesPerSec = 26;

animTexName[00] = "fps/data/textures/particles/flames0";
animTexName[01] = "fps/data/textures/particles/flames1";
animTexName[02] = "fps/data/textures/particles/flames2";
animTexName[03] = "fps/data/textures/particles/flames3";
animTexName[04] = "fps/data/textures/particles/flames4";
animTexName[05] = "fps/data/textures/particles/flames5";
--------

All of these uses the same 6 fireo-fire5 png's.
The first 3 with either a ifl or dml files to select the bitmpas.
None of this worked.

Since Im not a programmer/scripter I don't really know what you mean by array. I'm a "cut and paste scrpiter" at best:)

If you have any ideas let me know (include how to do it, please).

// Clocks out.
#6
10/23/2001 (7:51 am)
is that from the particle code ? what I'm say (and I hope im right . . is that the projectile code datablock should (and hopefully will cover all this)but to solve your problem try making an object in max to represnt the particle (i wonder is particle systems can be exported?) or use just one texture to represent the front of the flame. Instead of doing an array (a series of images) you could go into the ParticleData and make the particle system for that on "projectile" which is a series of smoke particles like
datablock ParticleData(FlameTrailParicle)
{
. . .
textureName = "*/somegreysacleimage.png";

color[0]="1.0 0.0 0.0"; //red
color[1]="1.0 0.5 0.0"; //orange? I think
color[2]="1.0 1.0 0.0"; // yellow I think

sizes[0] = 0.25;//starts small
sizes[1] = 1.0; //grows big
sizes[2] = 0.5; //shrinks . . .btw the number in a []says it is an array (series)

time[0] = 0.0; //inital fire time
time[1] = 0.3; //a third of a second later i think
time[2] = 1.0; // a full second from emmision

OR

I just read that in the ParticleData class that there is some variables called "textureNameList[];" and textureList[]; I really would like one of the main guys to back me up on this one, but you might be able to use this array of textures to change the texture depending on the arrays?!?!?! Am I right, or is that variable used for something else?
Anthony
#7
10/23/2001 (7:59 am)
oh missed somthhing in the particle code CLOCKS be sure to set the variavle animateTexture = TRUE; is you use a animated texture instead of the grayscale image
#8
10/23/2001 (8:08 am)
Do it in the code of the weapon. Or add texture cycling to the particle system.

Phil.
#9
10/23/2001 (8:16 am)
Now i have tested both the textureNameList[0] and textureList[0] and added the animateTexture = true;
in every plave I could think off.
All this was done in my flamethrower.cs

And none of it is working.
It either crashed the game or in most cases just render planar squares.

So any one feels like do a small step by step solution for me, please.

I'll buy you a beer :)

// Clocks out
#10
10/23/2001 (8:28 am)
leave out the texturelists stuff that was a guess . . . turn animatetexture to true and put your animated texutre into the textureName variable, and do all the color, time, and sizes arrays stuff I wrote for you That at least should work