Game Development Community

Particles and Decals client not working

by Stephen · in Torque 3D Professional · 02/03/2016 (2:54 am) · 14 replies

I'm currently trying to add the FX Pack#1 and this thread to Torque 3D. The server sees both particles and blood decals but when a client joins they see nothing. I have tried multiple versions of Torque 3D from 1.2 to 3.8(MIT) and all versions this problems is in all of them.

#1
02/03/2016 (7:51 am)
Yes, this does not work this way, I used that same resource and encountered the same issue. I have a much more complicated solution now.
#2
02/03/2016 (7:52 am)
If there is a solution then that's great. I'll take anything that I can.
#3
02/03/2016 (9:02 am)
You can look into mine, Azaezel in the chat helped me creating it:

Splatter function:
https://github.com/Duion/Uebergame/blob/master/scripts/server/player.cs#L267

It has more features, it splatters to walls, can adjust distance, scale and scale based on damage amount and cutoff, so it does not scale too high and can change behavior based on damage type.

Client splatter support:

https://github.com/Duion/Uebergame/blob/master/scripts/client/client.cs#L190

Source code fix:

https://github.com/Duion/Torque3D/commit/79c6a25050be61eab99789e1bc52006d2bea973c#diff-2a1b1d91e839708dbae0e6fa6b82ab76

only the line "assignName(lookupName);" the rest is not relevant for you.
#4
02/03/2016 (9:48 am)
Well that done the trick! Thank you very much for your solution. Is there a way to increase the rate of blood created?

I have another question that you may know. I'm trying to figure out how to use different explosions for different types of stuff. So like you have dirt explosion, metal explosion, etc.. for a single weapon.

I'm trying to use the FX Pack 1 with the Lurker. The FX pack has explosion for dirt, metal, building that I would like to use. How would I go about doing this?
#5
02/03/2016 (11:44 am)
You can play with the numbers.

Do you mean material based explosions? I did not look into this yet, but there is a resource that does this somewhere. It is called armor piercing projectiles or so, this also has material based explosions.
And I don't know about the FX Pack 1 or what it is.
#6
02/03/2016 (12:00 pm)
I forgot to add the link to explain what FX Pack was.https://www.garagegames.com/community/blogs/view/11523

It's custom particles of explosions for weapons.
#7
02/03/2016 (1:27 pm)
Yes, but no idea what this is, the link is down.
#8
02/03/2016 (1:37 pm)
Basically it's more particles for different types of explosions for the weapons. If you look in the ProjectileData you can define what explosion you want for that weapon. So you can have a different particle explosion for a grenade and pistol.

I can put together a quick video of the pack. By the way, it was an old pack that was on the store but sadly it's not anymore.
#9
02/03/2016 (3:16 pm)
Yes, you can make different particleDatablocks for different weapons, but this is a trivial task.
#10
02/03/2016 (3:26 pm)
Have you done anything with different particleDatablocks?
#11
02/03/2016 (4:18 pm)
You can simply change them, what is the problem? I made a lot of custom particles.
#12
02/03/2016 (4:27 pm)
Well here's what I'm looking to add. I would like to change the Lurker weapon to use different explosions for different types of materials.

Lurker:
Projectile hits terrain it uses dirt explosion.
Projectile hits Player it uses blood explosion.
Projectile hits building it uses metal explosion.

datablock ProjectileData( BulletProjectile )
{
   projectileShapeName = "";

   directDamage        = 5;
   radiusDamage        = 0;
   damageRadius        = 0.5;
   areaImpulse         = 0.5;
   impactForce         = 1;

   explosion           = BulletDirtExplosion; **
   decal               = BulletHoleDecal;

   muzzleVelocity      = 120;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 992;
   fadeDelay           = 1472;
   bounceElasticity    = 0;
   bounceFriction      = 0;
   isBallistic         = false;
   gravityMod          = 1;
};

function BulletDirtProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
   // Apply impact force from the projectile.
   
   // Apply damage to the object all shape base objects
   if ( %col.getType() & $TypeMasks::GameBaseObjectType )
      %col.damage(%obj,%pos,%this.directDamage,"BulletProjectile");
}

** Where you can change the type of explosion.
#13
02/03/2016 (5:08 pm)
This feature is not available in stock I think, you would have to write your own code for it.
#14
02/03/2016 (11:03 pm)
Okay, well thank you for the help anyway. I'm glad that I was able to get the decals working on the client.