godotengine / godotengine/godot-docs

The tutorial code error in the Godot introductory documentation causes the enemy animation to fail to play properly.

Open
#10,898 3 comments 0 reactions 0 assignees View on GitHub
area:getting started bug enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

In the "Getting Started - Your First 2D Game - Directory - Creating Enemies - Enemy Script" section of the code, the line `$AnimatedSprite2D.animation = mob_types.pick_random()` only randomly selects the enemy's movement state but does not play the enemy's animation. None of the subsequent code addresses this issue, which causes users following the documentation to end up with enemies that move along their paths but do not play animations. The above line of code should perhaps be changed to `$AnimatedSprite2D.play(str(mob_types.pick_random())).`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.