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
};
#22
Nothing special in the onCollision function, the standard function from the crossbow script will work fine.
Maybe there's a problem with the Torque Demo?
06/24/2006 (3:32 am)
I just tested the projectile shape, decals still work with or without a shape specified. Nothing special in the onCollision function, the standard function from the crossbow script will work fine.
Maybe there's a problem with the Torque Demo?
#23
06/24/2006 (3:58 am)
Perhaps that function in the code was removed from the demo? That's the only logical guess at this point.
#24
06/24/2006 (4:02 am)
Maybe its something with blockland thats what this script is for.
#25
06/24/2006 (4:48 am)
Is the projectile's velocity higher than 1000?
#26
06/24/2006 (4:58 am)
No it isn't.
#27
06/26/2006 (2:51 am)
I would like decals either , so waiting for the answer , :)
#28
06/26/2006 (11:50 am)
I think blockland is using Torque 1.2 which means that function would not exist, assuming it's a new addon.
#29
P.S. What the hell is blockland?
06/26/2006 (11:56 am)
Nah, torque's decal code has been around since Tribes' days. Maybe it's just broken in 1.2. P.S. What the hell is blockland?
#30
06/26/2006 (12:00 pm)
It is a game, kind of like legos but your a lego guy and you can build stuff lol.
#31
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9349
06/26/2006 (12:40 pm)
I dont think the code above is complete. Take look at this link, this one I use and have not problems.http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9349
#32
06/26/2006 (1:30 pm)
I have looked at that link and the code posted is not the entire weapons code only theparts of interest.
#33
06/26/2006 (4:01 pm)
The "decals[x]" property needs to be defined in the ExplosionData for the effect you are using (bulletExplosion), not the ProjectileData.
#34
06/26/2006 (6:55 pm)
I guess you own TGE the link will tell you where to put the code. Open the crossbow.cs put in the code from the link. If you write your own weapon.cs you will find plenty example on GG or use crossbow to see how it is done. If you move this thread to the private form I would be happy yo give you a copy of it working with the crossbow.
#35
No it doesnt.
06/26/2006 (11:24 pm)
Quote:
The "decals[x]" property needs to be defined in the ExplosionData for the effect you are using (bulletExplosion), not the ProjectileData.
No it doesnt.
#36
06/26/2006 (11:26 pm)
Quote:That's my resource, yay I helped someone ;)
I dont think the code above is complete. Take look at this link, this one I use and have not problems.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9349
#37
06/26/2006 (11:46 pm)
Oh shoot you're right... I forgot I rewrote that part of my source >.>.
#38
06/26/2006 (11:49 pm)
LoL, so you have decal explosions... interesting ;)
#39
06/27/2006 (7:16 am)
Tim that whork like charm. It was very easy to use. It drop right in. Outstand job with that resource.
#40
06/27/2006 (7:56 am)
I test the above decal code with the demo, it does work. There must be something wrong with png image. Power of 2, check your image for that. example (128 x 256, 128 x 128, 512 x 256, etc). This will not work 127 x 187.
Torque Owner Adam Troutman