In case someone is still looking, here's some code that causes afterimage trails (have not tested in 1.4 yet):
public override void SetStaticDefaults()
{
ProjectileID.Sets.TrailCacheLength[projectile.type] = 7; // how long you want the trail to be
ProjectileID.Sets.TrailingMode[projectile.type] = 0; // recording mode
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) {
//Redraw the projectile with the color not influenced by light
Vector2 drawOrigin = new Vector2(Main.projectileTexture[projectile.type].Width * 0.5f, projectile.height * 0.5f);
for (int k = 0; k < projectile.oldPos.Length; k++) {
Vector2 drawPos = projectile.oldPos[k] - Main.screenPosition + drawOrigin + new Vector2(0f, projectile.gfxOffY);
Color color = projectile.GetAlpha(lightColor) * ((float)(projectile.oldPos.Length - k) / (float)projectile.oldPos.Length);
spriteBatch.Draw(Main.projectileTexture[projectile.type], drawPos, null, color, projectile.rotation, drawOrigin, projectile.scale, SpriteEffects.None, 0f);
}
return true;
}
The code in PreDraw is what allows the lines in SetStaticDefaults() to take effect. Just having the SetStaticDefaults() lines alone isn't enough, and won't produce any afterimages.