0 votes

Hello. Is this possible to override sprites in AnimationSprite node? I am trying to make different fighters from one base scene, is it possible to do?
enter image description here

When I do it now all changes are lost after restart or in game.

in Engine by (29 points)
edited by

1 Answer

0 votes

One way would be to make every sprite it's own scene. Then place them all under a 2D node, using the animation player you toggle manually what sprite is active.

It will look like this:
enter image description here
Here is a zip with the project:

The nice thing about doing it like that, is that you can use Godot's "group" system or even just the signal system to check collisions then.

Most fighting games animate the collisions or do cell checks.
What you are doing here, animating collisions like sprites isn't what collision systems are made for, expect some problems.

The Godot Area2D will be the most stable for what you are doing, since it works like a cell lookup.
Try collisions first and if there is bugs try the Area2D.

by (1,434 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.