Anyone have a clue how to....
by Vince Gee · in Torque Game Engine · 06/26/2005 (4:32 pm) · 4 replies
Iterate through all the defined datablocks in the game or are they all client side?
I mean, a way for me to have it dump the player objects, campfires, etc. I know I can dump using listObjects to get the static objects, but I'm looking for a method to list all the datablocks in general set up in the world. So for example I could get a listing of all the player datablock models, flares, etc.
Vince
I mean, a way for me to have it dump the player objects, campfires, etc. I know I can dump using listObjects to get the static objects, but I'm looking for a method to list all the datablocks in general set up in the world. So for example I could get a listing of all the player datablock models, flares, etc.
Vince
About the author
www.winterleafentertainment.com
#2
datablock AudioProfile(CrossbowReloadSound)
{
filename = "~/data/sound/crossbow_reload.ogg";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(CrossbowFireSound)
{
filename = "~/data/sound/crossbow_firing.ogg";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(CrossbowFireEmptySound)
{
filename = "~/data/sound/crossbow_firing_empty.ogg";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(CrossbowExplosionSound)
{
filename = "~/data/sound/crossbow_explosion.ogg";
description = AudioDefault3d;
preload = true;
};
//-----------------------------------------------------------------------------
// Crossbow bolt projectile splash
datablock ParticleData(CrossbowSplashMist)
{
dragCoefficient = 2.0;
gravityCoefficient = -0.05;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 400;
lifetimeVarianceMS = 100;
useInvAlpha = false;
spinRandomMin = -90.0;
spinRandomMax = 500.0;
textureName = "~/data/shapes/crossbow/splash";
colors[0] = "0.7 0.8 1.0 1.0";
colors[1] = "0.7 0.8 1.0 0.5";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 0.5;
sizes[1] = 0.5;
sizes[2] = 0.8;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(CrossbowSplashMistEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 3.0;
velocityVariance = 2.0;
ejectionOffset = 0.0;
thetaMin = 85;
thetaMax = 85;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
lifetimeMS = 250;
particles = "CrossbowSplashMist";
};
A way to build a gui that would show the name and type of the datablocks in dropdowns.
So someone could pick ParticleEmitterData and in another dropdown list or listbox it would show CrossbowSplashMistEmitter
Mainly for reuse of datablocks, I don't mind building the interface if the sdk call exists.
Vince
06/27/2005 (7:01 am)
For these datablocks...datablock AudioProfile(CrossbowReloadSound)
{
filename = "~/data/sound/crossbow_reload.ogg";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(CrossbowFireSound)
{
filename = "~/data/sound/crossbow_firing.ogg";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(CrossbowFireEmptySound)
{
filename = "~/data/sound/crossbow_firing_empty.ogg";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(CrossbowExplosionSound)
{
filename = "~/data/sound/crossbow_explosion.ogg";
description = AudioDefault3d;
preload = true;
};
//-----------------------------------------------------------------------------
// Crossbow bolt projectile splash
datablock ParticleData(CrossbowSplashMist)
{
dragCoefficient = 2.0;
gravityCoefficient = -0.05;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 400;
lifetimeVarianceMS = 100;
useInvAlpha = false;
spinRandomMin = -90.0;
spinRandomMax = 500.0;
textureName = "~/data/shapes/crossbow/splash";
colors[0] = "0.7 0.8 1.0 1.0";
colors[1] = "0.7 0.8 1.0 0.5";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 0.5;
sizes[1] = 0.5;
sizes[2] = 0.8;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(CrossbowSplashMistEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 3.0;
velocityVariance = 2.0;
ejectionOffset = 0.0;
thetaMin = 85;
thetaMax = 85;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
lifetimeMS = 250;
particles = "CrossbowSplashMist";
};
A way to build a gui that would show the name and type of the datablocks in dropdowns.
So someone could pick ParticleEmitterData and in another dropdown list or listbox it would show CrossbowSplashMistEmitter
Mainly for reuse of datablocks, I don't mind building the interface if the sdk call exists.
Vince
#3
06/27/2005 (7:12 am)
When you try and instantiate a new particleemitter in the world editor it gives you something that sounds like what you are talking about. Take a look at that.
#4
06/27/2005 (9:21 am)
Ahhh, good call... totally forgot about that
Associate Kyle Carter