How can one character achieve multiple afterimage effects

I’m currently facing a challenge: game characters have multiple actions that require afterimages, such as dodging, jumping, and falling. I’ve applied afterimages to the dodge action, but no matter what I try, I can’t get jumping and falling to use afterimages. According to the manual, a game object can only have one afterimage. I’ve tried many methods without success. Is there any way to have different animations use different afterimages?

Hmm I tested this on my end and the afterimage copied whatever animation was playing, so dodge, jump and fall all showed their own frames with just the one AfterimageSettings node.

Here’s a quick video of it working for me:

I’m wondering how you’re turning it on for each action. What I’d do is flip the is_show_after_image switch on in each action that should show it and back off when the action ends. If it’s only being switched on in the dodge action, that could explain why jump and fall never show anything.

Also, is your character using one Sprite or AnimatedSprite2D? Or do you have separate sprites for different actions? The Afterimage Target can only point at one node, so if jump and fall are drawn by a different sprite the afterimage wouldn’t be able to copy them.

If what you’re after is a different look per action, like a different color or duration for the dodge afterimage versus the jump one, that’s where the one per object limit comes in. Let me know which one you mean and I can dig further.

2 Likes

Thanks for letting me know! I was previously trying to generate ghosting effects for multiple animations by using different images (multiple sprite nodes), which was incorrect, and I also misunderstood the manual. With your method, I successfully achieved different ghosting effects for multiple actions. The key is to use a sprite atlas. Thanks again!

1 Like