Skip to content

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

Open
@598645026

Description

@598645026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:getting startedIssues and PRs related to the Getting Started section of the documentationbugenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions