Game Development Community

What's mean?

by Mquaker · in Technical Issues · 08/22/2006 (9:59 pm) · 7 replies

// Projectile Object
datablock LineTracerData(thompsonTracer)
{
trailLifetimeMS = 0.001;
newRingMS = 0.0001;

numSegments = 4;

twistSpeed = 10;

sizes[0] = 0.006;
sizes[1] = 0.006;

sizeTimes[0] = 0.0;
sizeTimes[1] = 1.0;

colors[0] = "1.00 0.90 0.50 0.35";
colors[1] = "1.00 0.90 0.50 0.25";
colors[2] = "1.00 0.70 0.25 0.0";

times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;

texture[0] = "~/data/shapes/particles/tracer.png";
horizontalTexWrap[0] = 10;
verticalTexWrap[0] = 1;
horizontalTexMovementBase[0] = 0;
verticalTexMovementBase[0] = 0;

what's mean the words in the code of weapon?
Without understanding enough, have somewhat problem for the scripts because I use as it were as given in TGE.

Let me know a Detailed explanation.
Thanks...

#1
08/23/2006 (6:11 pm)
www.garagegames.com/docs/tge/general/ch05s04.html

Give that URL a whirl, it explains the TGE demo and how to mod it through TorqueScript (the chapter I specifically pointed too) references the Data Blocks section, which appears to be what your questioning.
#2
08/23/2006 (6:32 pm)
@Sang hwan Roh

That's actually a bit of a tall order to break this down and explain it all to you. Let me ask you this first. Are you having trouble understanding what the words mean? or what the code does?
#3
08/23/2006 (11:53 pm)
Sizes[0] = 0.006;
sizes[1] = 0.006;

Can you explain the difference between sizes[0]and sizes[1]?

sizeTimes[0] = 0.0;
sizeTimes[1] = 1.0;

Can you explain the difference between sizeTimes[0]and sizeTimes[1]?

also...below lists....

colors[0] = "1.00 0.90 0.50 0.35";
colors[1] = "1.00 0.90 0.50 0.25";
colors[2] = "1.00 0.70 0.25 0.0";

times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;

How're these scipts values apply to the game??

anyway thanks for your concerning..
#4
08/24/2006 (12:43 am)
You need to learn about particle effects to understand this function. That is what these values are being used for. To do a particle effect when you fire the weapon. Particle effects are effects in games such as smoke and explosions and fire. Effects that are made of a bunch of tiny particles.

Here's a basic tutorial about particle effects in games: www.devmaster.net/articles/particle_systems/
#5
08/24/2006 (1:47 am)
After checking it out, will tell again.
Thanks...~~
#6
08/27/2006 (7:03 pm)
Www.devmaster.net/articles/particle_systems/

checked it out. well, thanks. but

it is basic tutorial that connected with explosions such as airborne & impact explosions generally.

what i want to know, in the thompson gun script

trailLifetimeMS = 0.001, what's it mean?

newRingMS = 0.0001, what's this mean?

a difference between [0] and [1] in the size, sizetime, color...etc

Could you give me a simple explanation or other tutorial ??

Thank you for your time...
#7
08/27/2006 (7:42 pm)
TrailLifeTimeMS is how long in milliseconds the trail will last before fading away, starting at the point it is created. so when a ThompsonTracer is added to the game, it will almost instantly disappear (0.001 Milliseconds)

Size[0] = 0.006;
Size[1] = 0.006;

sizeTimes[0] = 0.0;
sizeTimes[1] = 1.0;

I believe states that at 0.0 seconds (sizeTimes[0]) the projectile size will be 0.006 (Size[0] = 0.006;)
And at 1.0 seconds (sizeTimes[1] = 1.0;), size will again be 0.006 (Size[1] = 0.006;)
If you set Size[1] = 5; at 1.0 seconds (sizeTimes[1]) it will change from 0.006 to 5

I might be wrong on this