Why trails(FlxTrail) don't die after killing the sprite they are attached to?

50 views
Skip to first unread message

Kemo Jallow

unread,
Dec 15, 2015, 11:44:32 AM12/15/15
to HaxeFlixel
i have some moving sprites with trails and these sprites get killed at  certain point. Why is the  trails don't get kill after the sprite dies?

Gama11

unread,
Dec 15, 2015, 4:05:37 PM12/15/15
to HaxeFlixel
Why would you expect .kill()ing a sprite to also kill a trail? The FlxSprite instance doesn't even know it has a trail, and the trail and sprite are add()ed to the state separately.

Kemo Jallow

unread,
Dec 15, 2015, 9:27:44 PM12/15/15
to HaxeFlixel
On Wednesday, December 16, 2015 at 12:44:32 AM UTC+8, Kemo Jallow wrote:
> i have some moving sprites with trails and these sprites get killed at  certain point. Why is the  trails don't get kill after the sprite dies?

How do I go about killing the trails.

Gama11

unread,
Dec 16, 2015, 1:30:39 PM12/16/15
to HaxeFlixel
Have you tried trail.kill()? Works for me.
Reply all
Reply to author
Forward
0 new messages