It took me a while to discover this trick, and there is no need for you to waste the same amount of time. Note that this only works well for short range projectiles.
Code:
{
type particle
{
texture battlefield/fire/smoke0.tga
size_range 2.1, 2.2
age_range 0.3, 0.4
grow_range 1.1, 1.2
velocity 0.0, 0.2
colour 190, 190, 190
alpha_max 80 ; maximum alpha value
emitter distance
{
; How many particels per meter. The inverse must not be higher then the maximum range
density 0.02
;emitter_falloff_dist 50 ; distance in meters to reduce emission over
;emitter_falloff_bias 0.5
}
fade_time 0.8
}
}
The lowest value of density seems 0.01. We use 0.02 for ranges of 60 to 80 metres or so. It works like this: the density dictates how many particles are drawn per meter. If you make it 0.02 then there will be 1 particle drawn per 50 metres. The first particle is drawn around the firing soldier (which is the effect you want), then next one is then 50 metres along the trajectory of the projectile. However for some reason even when the maximum range is 70 metres, this second particle is not shown (which is good as it would appear somewhere in the middle of nowhere).
If the target is under 50 metres then there usually is no smoke as the trajectory path is shorter than the the inverse of the density.
So pick a range under 100 metres and play around with the density until you get a decent amount of smoke and no smoke elsewhere.
I used 3 versions of this to get a quick puff of smoke (the above settings), then a bigger puff of smoke that lasts longer and then a final one. Play around with fade_time, size_range, age_range, grow_range.
Cheers,
Duke John
Bookmarks