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 (289 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 Frequently asked questions and 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 [email protected] with your username.