While working on a secondary muzzle for a rifle, I noticed I couldn't change the firing smoke effect. Instead of using the particle effect that I defined for the muzzle, it uses the weapon's primary muzzle effect ("RifleAssaultCloud"). I verified that my code is set up properly using the config viewer, and I tried replacing the particle effect for the weapon itself. As expected, the effect is also applied to the secondary muzzle, which it shouldn't be.
I already came up with two alternatives, however they are far from pretty and can cause additional problems on the long run:
- dynamically swap the unit's weapon to a derivated weapon class that uses the different particle effect in its "GunParticles" class (could lead to cloning / loss of weapon attachments, gain/loss of ammo, potentially performance heavy depending on how often the muzzle is used)
- use a script to emit the particle effect via a "Fired" EH (worst alternative, as positioning and angling the particle effect is not accurately feasible with the current scripting commands, also potentially performance heavy as particle effect has to be broadcasted)
Neither of these alternatives is a real fix to the problem, but only a dirty workaround. A proper (engine-side) solution is needed.