Author Topic: paritcleEmitterData - Never mind, I'll find some sort of a workaround.  (Read 926 times)

So I'm having an issue creating a simple raindrop projectile, due to this particle issue here. What's going on here is I'm trying to have the projectileemitter not spawn multiple instances of the image, and instead just have one and stick with it as it lags since the image has alpha and Blockland's alpha blending is so slow it's ridiculous.

Basically I just need to know how to make this code ONLY spawn ONE instance of the image for the projectile to use all the way through. This is being used as the particleEmitter of the projectile:

Code: [Select]
datablock ParticleData(WMRainTrailParticle)
 {
   dragCoefficient      = 0;
   gravityCoefficient   = 0.777;
   inheritedVelFactor   = 1.0;
   constantAcceleration = 0.0;
   textureName          = "./Data/Images/Raindrop.png";
   spinSpeed   = 0.0;
   spinRandomMin = 0.0;
   spinRandomMax = 0.0;
   colors[0]     = "0.2 0.2 0.4 0.5";
   colors[1]     = "0.2 0.2 0.4 0.5";
   colors[2]     = "0.2 0.2 0.4 0.5";

   sizes[0]      = 0.2;
   sizes[1]      = 0.2;
   sizes[2]      = 0.2;

   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;

   useInvAlpha = false;
};
datablock ParticleEmitterData(WMRainTrailEmitter)
{
   periodVarianceMS = 1;
   ejectionVelocity = 0.25;
   velocityVariance = 0.0;
   ejectionOffset   = 0;
   thetaMin         = 0;
   thetaMax         = 0;
   phiReferenceVel  = 0;
   phiVariance      = 0;
   overrideAdvance = true;
   particles = "WMRainTrailParticle";

   useEmitterColors = true;

   uiName = "Raindrop Trail";
};

Thanks :)
« Last Edit: June 18, 2016, 11:26:24 PM by BloxersPost »

To have less particles emitted, you need to add ejectionPeriodMS = 500; above periodVarianceMS in the emitter data, then you can raise the value if too many particles are still being emitted

https://forum.blockland.us/index.php?topic=59525.0
Idk if what you need is in there, but that's a really good reference for making particles / emitters and whatnot.

To have less particles emitted, you need to add ejectionPeriodMS = 500; above periodVarianceMS in the emitter data, then you can raise the value if too many particles are still being emitted
I've tried that, it still lags with that and setting the values too high to make less lag always makes the emitter appear too late.

try making the projectile itself a raindrop, or emit an image that lasts for 10 ms thats a raindrop/a bunch of raindrops

try making the projectile itself a raindrop, or emit an image that lasts for 10 ms thats a raindrop/a bunch of raindrops
The second suggestion is very clever, however I don't really think it'd look good without the splash emitter upon ground hit.. I mean, it wouldn't look 3-Dimensional with two dimensional splashes, yaknow?

projectile explosion can emit a water splash emitter. its how default rain is handled anyways and nobody notices

projectile explosion can emit a water splash emitter. its how default rain is handled anyways and nobody notices
I know that, I just need to figure out how to make the water drop itself non-laggy. Two at a time will drop like 30fps idk why

its how default rain is handled anyways and nobody notices
SSHHHH! It's PrecipitationData, it has it's own functions and parameters, don't spoil the magic!