I always wanted to write such a fx class for the wingtips of planes
(like supcom it has), but the Lua API is still missing some functions
to do so.
The issue is that you need to know the exact model piece position
you want to attach the fx to. To do so you need the offset and rotation
of the model piece (doable) and the unit's upright coords (not
doable).
So you can try to determine it with GetUnitHeading() etc., but those
calls don't work always (i.e. they don't work for planes).
LUPS had such issues with 75b2, so there are now the new
gl.UnitPieceMultMatrix() and gl.UnitMultMatrix() calls, but they do an
opengl modelview transformation, so you would have to save for
each polystrip vertex a 4x4 matrix or (what is much harder) you have
to extract the wanted information from the matrices.
Also there is the possiblity to determine the piece position in synced
lua code with Spring.GetCOBUnitVar(), but then you would have to
send it to the unsynced side etc. and like the GetUnitHeading variant
it doesn't always return valid positions.
So atm it isn't possible to do something like that in Lua, but I will
write a patch soon (my bug list is long

), so we will have something
like that hopefully in 76b2.