Skip to content

Lesson 21: animation plays based on combo array content, not play_animation() #550

@pjhanzlik

Description

@pjhanzlik

Describe the bug
String Array Practice in Lesson 21 has two requirements, fill an array with combo text and call each piece of text with play_animation() in a for loop. The idea is that the animation won't play until play_animation() is called, but turns out the robot is happy to fight with just the combo array filled. I'm assuming one of the key parts of this lesson is to show String arrays are just normal arrays which can be called in a for loop, so getting rid of play_animation() requirement is not an option. (Permalink of lesson file on GitHub is provided in Additional Content section of this issue.)

To Reproduce
Steps to reproduce the bug:

  1. Go to Lesson 21
  2. Open Practice "Using An Array Of Strings To Play A Combo" at the end of the lesson
  3. Fill combo = [] with "jab" and "uppercut" entries
  4. Run code using button or Ctrl+Enter
  5. Watch GDBot punch his heart out, even though we forgot to call play_animation()

Expected behavior
GDBot should not move if play_animation() is not called. That way the error of not using play_animation() will be more evident to learners.

Screenshots
Screenshot from 2022-06-10 09-51-37
Note the bot is using an uppercut, even though play_animation() is not called.

Information about your device (please complete the following information):

  • Operating System: Pop OS 22.04 LTS

Additional context
Permalink of StringArray.gd

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions