Projectile Trails - SmArtKar/AthenaFramework GitHub Wiki

CompProperties_ProjectileTrail can be attached to any projectile's ThingDef in order to allow to attach or spawn flecks, motes, effecters and sustainers. You can also make your projectile have an athena beam linking them and their firer. This looks the best on high-speed projectiles as the beam will look unnatural if the firer moves while the projectile is in flight.

Beam def must be have a Beam thingClass or be a subclass of a Beam

    public class CompProperties_ProjectileTrail : CompProperties
    {
        // Def for flecks that will be continiously spawned
        public FleckDef trailFleck;
        // Def for motes that will be continiously spawned
        public ThingDef trailMote;
        // Def for effecters that will be continiously spawned
        public EffecterDef trailEffecter;
        // Def for an effecter that will be attached to the projectile
        public EffecterDef projectileEffecter;
        // Def for an Athena beam
        public ThingDef beamDef;
        // Chance curve for spawning effects
        public SimpleCurve effectSpawnCurve = new SimpleCurve
        {
            {
                new CurvePoint(0f, 0.5f),
                true
            },
            {
                new CurvePoint(1f, 0.5f),
                true
            }
        };
        // Def for a mote that will be attached to the projectile
        public ThingDef attachedMote;
        // Offset for the mote above. Rotates with the projectile
        public Vector3 attachedMoteOffset;
        // Def for a dual-sided mote that will be attached to the firer and projectile
        public ThingDef dualMote;
        // Offsets for the mote above. Offset A is for the projectile side and rotates with the projectile, while offset B is for the firer and doesn't rotate
        public Vector3 dualMoteOffsetA;
        public Vector3 dualMoteOffsetB;
        // Def for a sustainer that will be attached to the projectile
        public SoundDef sustainer;
    }