Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • solarus solarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 222
    • Issues 222
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • 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