Repentance introduced a new effect named SPRITE_TRAIL (166). This effect is used by the eyeballs shout out by Maze Roamers. This trail can be applied to any entity.
To apply the trail to an entity, you must spawn the trail then set its parent. You can also set the MinRadius property to change how long the base of the trail is, and the SpriteScale to change thickness. The following code example creates a long, green trail.
123456
localentityParent=...-- Set this to the parent of the trail localtrail=Isaac.Spawn(EntityType.ENTITY_EFFECT,EffectVariant.SPRITE_TRAIL,0,entityParent.Position,Vector.Zero,entityParent):ToEffect()trail:FollowParent(entityParent)trail.Color=Color(0,1,0,1)trail.MinRadius=0.25trail.SpriteScale=Vector.One
Warning
Setting the trail's color to black will make it invisible. This is because the trail's sprite is set to blend additively. The blending mode can only be changed with REPENTOGON.
1 2 3 4 5 6 7 8 91011
-- REPENTOGON example to change the blending mode.localentityParent=...-- Set this to the parent of the traillocaltrail=Isaac.Spawn(EntityType.ENTITY_EFFECT,EffectVariant.SPRITE_TRAIL,0,entityParent.Position,Vector.Zero,entityParent):ToEffect()trail:FollowParent(entityParent)trail.Color=Color(0,1,0,1)trail.MinRadius=0.25trail.SpriteScale=Vector.Onelocalsprite=trail:GetSprite()localblendMode=sprite:GetLayer(0):GetBlendMode()blendMode:SetMode(BlendType.NORMAL)