0 votes

How do I instance bullet when a certain frame is playing in animated sprite node?

in Engine by (12 points)

1 Answer

0 votes

to get the current frame:

const BULLET = preload(the bullet path)

if $AnimatedSprite.frame == (the index of the frame you want):
var bullet = BULLET.instance()

by (255 points)

Thank you, but if the animated sprite has multiple animations how do I set the frame on the specific animation?

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.

Categories