Decals
by Adam Troutman · in General Discussion · 06/24/2006 (12:30 am) · 41 replies
I am trying to get splatter decals toshow up but im getting nothing, anyone know what I need to do?
datablock decaldata (paintdecal)
{
sizex = 1;
sizey = 1;
texturename = "~/data/shapes/paintsplatter.png";
};
//projectile
datablock ProjectileData(pbgungProjectile)
{
projectileShapeName = "";
directDamage = 25;
radiusDamage = 10;
damageRadius = 0.5;
explosion = bulletExplosion;
// particleEmitter = bulletTrailEmitter;
muzzleVelocity = 300;
velInheritFactor = 1;
armingDelay = 0;
lifetime = 8000;
fadeDelay = 7500;
bounceElasticity = 0;
bounceFriction = 0;
isBallistic = true;
gravityMod = 0;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
//Decal Data Start
decals[0] = "paintdecal";
decals[1] = "paintdecal";
//Decal Data end
};
datablock decaldata (paintdecal)
{
sizex = 1;
sizey = 1;
texturename = "~/data/shapes/paintsplatter.png";
};
//projectile
datablock ProjectileData(pbgungProjectile)
{
projectileShapeName = "";
directDamage = 25;
radiusDamage = 10;
damageRadius = 0.5;
explosion = bulletExplosion;
// particleEmitter = bulletTrailEmitter;
muzzleVelocity = 300;
velInheritFactor = 1;
armingDelay = 0;
lifetime = 8000;
fadeDelay = 7500;
bounceElasticity = 0;
bounceFriction = 0;
isBallistic = true;
gravityMod = 0;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
//Decal Data Start
decals[0] = "paintdecal";
decals[1] = "paintdecal";
//Decal Data end
};
#2
06/24/2006 (2:39 am)
Tried all that.
#3
06/24/2006 (2:41 am)
Any console warnings?
#4
06/24/2006 (2:42 am)
Nope.
#5
06/24/2006 (2:43 am)
And decals only work on terrain and interiors, not DTS objects.
#6
06/24/2006 (2:45 am)
I know, I shot the ground specifically when trying to do it.
#7
06/24/2006 (2:46 am)
Well, the only thing I can think of is your prefs file. Do you have decals turned on?$pref::Decal::decalTimeout = "5000"; $pref::Decal::maxNumDecals = "256"; $pref::decalsOn = "1"; //if this is 0 decals are turned off
#8
06/24/2006 (2:47 am)
Already got that all set.
#9
06/24/2006 (2:52 am)
Well there's nothing wrong with your script, you have decals enabled in the prefs, the only thing it can be is the path to the texture or the texture itself. Other than that, I'm out of ideas??? Unless your projectile onCollision function isn't working? Have you tried deleting dso's?
#10
06/24/2006 (2:54 am)
Dsos deleted already and the on collision is working fine.
#11
06/24/2006 (3:00 am)
How about the png itself? Have you tried swapping out another file to see if there's a problem with the graphic, e.g., a bad alpha channel? Are you certain it's in the right location, with the correct filename?
#12
06/24/2006 (3:02 am)
I know its in the right spot and I made a different one after the first one wasnt working.
#13
E.g.
06/24/2006 (3:05 am)
Just humor me on this one, alter your texture path in script to be deliberately wrong. Then tell me if you're seeing white squares where your decal should be appearing.E.g.
texturename = "~/data/shapes/paintsplatterXXX.png";
#14
06/24/2006 (3:08 am)
Nothing.
#15
06/24/2006 (3:12 am)
Well you should be seeing big white squares. Have you made any head code changes in this area? Are you sure your weapon script is compiling without any warnings or errors?
#16
06/24/2006 (3:14 am)
No errors on the weapon I don't own the engine so I didn't change any of that code and I am seeing a lack of white squares.
#17
You're not specifying a dts shape for your projectile!
06/24/2006 (3:17 am)
Crap, the answer was here all along and I missed it.You're not specifying a dts shape for your projectile!
projectileShapeName = "~/data/shapes/styer/m16_bullet.dts";
#18
06/24/2006 (3:23 am)
It can apply damage without one but not a decal?
#19
Well I'm out of ideas, sorry.
06/24/2006 (3:25 am)
Good point, I thought that would be it as it's the only thing that looked wrong :( Well I'm out of ideas, sorry.
#20
06/24/2006 (3:26 am)
I will try that but if it doesnt work i dont know what to do, thanks for trying.
Torque Owner Tim Heldna
Make sure your texture path is correct, the texture itself is ok, the 'decaldata (paintdecal)' datablock is BEFORE the 'ProjectileData' datablock (in script) and as you are only using one decal you can remove 'decals[1] = "paintdecal";'.