Invalid set index 'current_frame' (on base: AnimatedTexture)

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

So when I read the docs, it says that AnimatedTexture has current_frame as variable to set.

Except when I try to do that, like this:

onready var heart_fx_texture = preload("res://assets/textures/Effect04AnimatedTexture.tres")

var heart_fx =
heart_fx.texture = heart_fx_texture
heart_fx.texture.current_frame = 0


Invalid set index ‘current_frame’ (on base: AnimatedTexture)

It does not set the correct animation frame. I also do not have access to the ‘oneshot’ property. But the heart_fx_texture is definitely of class AnimatedTexture.
I’m not sure what I’m missing. My Godot version is 3.2.1. Were these things added to AnimatedTexture in later versions?

:bust_in_silhouette: Reply From: Brightlight studios

Hello buddy, you see when you create a light 2d node does not have animated textures it just uses textures so if you wish for it to be animated you could try using particles

No, actually I have the animated texture working as a resource for the Light2D, that is not the problem, buddy.

It turns out all I had to do was update Godot to the latest version. 3.2.3 AnimatedTextures do have the current_frame property.

Robert van Engelen | 2020-09-25 07:32

Oh okay happy to hear

Brightlight studios | 2020-09-25 07:49