Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    • Menu
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • solarus solarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 229
    • Issues 229
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Solarus Games
  • solarussolarus
  • Issues
  • #1273
Closed
Open
Created Sep 24, 2018 by Alex Gleason@alexgleasonContributor

Animations with 1 frame do not work

In this scenario:

Screenshot_from_2018-09-23_21.50.17

Is does not seem that Solarus recognizes this as an actual animation. When there is only 1 frame, it doesn't matter if "Loop on frame" is ticked.

I think if "Loop on frame" is ticked, it should work like a normal animation, even when it's only 1 frame. In this case, it's an animation that loops forever over a single frame.

Changing this would also fix #1235.

To give an example of why this is important, hero:set_animation() says:

A function to call when the animation ends (on the tunic sprite). If the animation loops, or is replaced by another animation before it ends, then the function will never be called.

The animation in the screenshot should loop on frame 0, and therefore the callback will never be called. Instead, calling set_animation() does not work at all, because Solarus doesn't see this as an animation.

Likewise, in this scenario:

Screenshot_from_2018-09-23_22.00.53

the callback should be called after 100ms

This also affects stuff like sword animations, swim animations, etc as described in #1235

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking