• Changing CLuaParticle's texture
    3 replies, posted
Is there a way to change the texture of spawned CLuaParticle? example         local particle = self.FreeEmitter:Add(getRandomSmoak(), self.vOffset + dir * 4 * i)         print(particle)         particle:SetVelocity(VectorRand() * 10 + dir * math.Rand(150, 99) * i + 1.05 * AddVel )         particle:SetDieTime(muzzleTime * 3 * Lerp(i/4, .5, 1))         particle:SetStartAlpha(math.Rand(12, 16) * i)         particle:SetEndAlpha(0)         particle:SetStartSize(math.Rand(12, 8))         particle:SetEndSize(math.Rand(48, 32) * Lerp(i/4, 1, 1.5))         particle:SetRoll(math.rad(math.Rand(0, 360)))         particle:SetRollDelta(math.Rand(-0.8, 0.8))         particle:SetLighting(true)         particle:SetAirResistance(30 * i)         particle:SetGravity(smokeGravity)         particle:SetColor(255, 255, 255) I want to change this particle's texture to effect/endsmoke.
Doesn't seem to be any binding for such function, but maybe you can spawn two particles with same velocity etc and then do some alpha magic to fade out the old texture and fade in the new one?
i had to create my own custom PCFs in Source's particle editor for that kinda stuff
Added Suggestion in the github. Add Support of SpriteCard on CLuaParticle · Issue #1186 · Facepu.. Add Setter/Getter of Texture/Material on CLuaParticle. · Issue #.. @Willox @Rubat plz, let's make CLuaParticle great again. even simple thing like getter/setter for Texture/Material of CLuaParticle will open endless possibilities. my RT hack consumes 10 fps per 20 particles
Sorry, you need to Log In to post a reply to this thread.