Cannot change frames for AnimationPlayer

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By buildingdown
:warning: Old Version Published before Godot 3 was released.

I am new to the engine! As an exercise, I am trying to create a walk animation using this spritesheet, but I cannot change the frames. Can someone walk me through how to create an animation for walking down? The spritesheet for this action begins on the fifth row, and spans 4 columns.

Here is what I’ve done:

Node2D
  |-- Sprite
  |-- AnimationPlayer

For Sprite I have loaded that spritesheet png with the following settings:

Vframes: 1
Hframes: 1
Region: ON
Region rect: (0,0,32,32)
Scale: (.5,.5)

Everything else is default. On the Sprite, I do “Create New Animation” and give it the name walk_down.

Now a key icon with a plus sign shows up in my Inspector for the Sprite (next to Frame input), and clicking it brings up “Create NEW track for property ‘frame’ and insert key?”. I click Okay and a new track is created in the animation editor.

However, I cannot change the frame number. It’s set to Frame: 0, but I need the animation on the 5th row and its four 4 columns for the walk down animation. Clicking on the arrow up and arrow down, or manually setting the Frame to a number with the keyboard does nothing. It’s always displaying 0:

It always displaying 0

What have I done wrong? Why isn’t it pointing to the correct sprite image? Can someone walk me through creating an animation for walking down with this spritesheet?

:bust_in_silhouette: Reply From: D

You need to set the Vframes and Hframes to tell Godot how many columns and rows are in your spritesheet.