Animated sprite frame change

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By robeblue

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

:bust_in_silhouette: Reply From: mdubaisi

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()

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

robeblue | 2020-08-31 05:18