Author Topic: Bullet holes should be possible  (Read 3350 times)

Is there a way to make bullet holes, all you really need to do is make it so a decal (decal data) appears where the weapon's projectile hit

It might be possible, how would it be coded, i would give it a shot, but i don't know how it would be done

You would have to make it so it would switch decal to one of your faviorites on bullet impact .

Edit: I think at least I am not sure how this would be done .

Tom

Maybe use particals somehow.

Tom of course your gonna use particles what he's trying to figure out is how to mount the particle to where the bullet hits. This is very simple if you do it with bricks but it won't work properly on blockheads without some extra scripting. To make it work on objects simply change the bullet hit particle to the bullet hole and change it so instead of a spreading outwards in a circle make it stay still and remain there for a long period of time.

Tom of course your gonna use particles what he's trying to figure out is how to mount the particle to where the bullet hits. This is very simple if you do it with bricks but it won't work properly on blockheads without some extra scripting. To make it work on objects simply change the bullet hit particle to the bullet hole and change it so instead of a spreading outwards in a circle make it stay still and remain there for a long period of time.

Not possible nothing can stat attached to the player . It has been tried before , you could mount an expliosion with an emitter so that when said This add-on would be a waste you have to make every gun like this , or make new ones = too many data blocks = errors = less add-ons = you get what I mean .

Oh yeah you would not be scrpiting new guns but just adding a scrpit .
« Last Edit: December 31, 2007, 05:41:00 PM by chaseyqurt »

It's possible, but would be as laggy as the Wrench Decals in RTB. For mounting to people, more so. Do you really want it?

Of course it's possible, there's a decalmanager in the torque engine by default, and unless Badspot's gone and taken it out, all you have to do is the following:
Make your decal datablocks:
Code: [Select]
// Bullet holes
datablock DecalData(BulletDecal1)
{
   sizeX       = 0.1;
   sizeY       = 0.1;
   textureName = "~/data/shapes/Weapons/bullethole";
};
datablock DecalData(BulletDecal2 : BulletDecal1)
{
   textureName = "~/data/shapes/Weapons/bullethole2";
};

datablock DecalData(BulletDecal3 : BulletDecal1)
{
   textureName = "~/data/shapes/Weapons/bullethole3";
};

And add set the decal datablocks for it to use.
You can only have 6-8 datablocks set for a projectile.
Code: [Select]
// decal stuff
   decals[0] = BulletDecal1;
   decals[1] = BulletDecal2;
   decals[2] = BulletDecal3;

Of course it's possible, there's a decalmanager in the torque engine by default, and unless Badspot's gone and taken it out, all you have to do is the following:
Make your decal datablocks:
Code: [Select]
// Bullet holes
datablock DecalData(BulletDecal1)
{
   sizeX       = 0.1;
   sizeY       = 0.1;
   textureName = "~/data/shapes/Weapons/bullethole";
};
datablock DecalData(BulletDecal2 : BulletDecal1)
{
   textureName = "~/data/shapes/Weapons/bullethole2";
};

datablock DecalData(BulletDecal3 : BulletDecal1)
{
   textureName = "~/data/shapes/Weapons/bullethole3";
};

And add set the decal datablocks for it to use.
You can only have 6-8 datablocks set for a projectile.
Code: [Select]
// decal stuff
   decals[0] = BulletDecal1;
   decals[1] = BulletDecal2;
   decals[2] = BulletDecal3;
Sweet! I'ma try that... Uh, any way i could put this into a weapon? Wouldn't mind explaining?

I wanna add it to the RTB Blaster i had ported to retail
« Last Edit: December 31, 2007, 06:04:20 PM by Masterlegodude »


Just make a non moving emmiter with the texture for the explosion. 

Do what I said above, make your decal datablocks then assign them to projectiles, then the projectile will apply that decal to terrains and interiors.

Permanently or does it fade away after time?

Fades away, the default is about 4 seconds and the max visible is 250. You can change these in some prefs files.

I have explosion holes if anyone wants em

They're called scorches.