Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • 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 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
  • #1348
Closed
Open
Created Feb 18, 2019 by Alex Gleason@alexgleasonContributor

Can't put an animated sprite on top of the hero

Screenshot_from_2019-02-17_22.57.46

Frozen at frame 0, thought bubble doesn't move.

Screenshot_from_2019-02-17_22.58.49

  -- Rachel has a thought bubble animation
  function hero:think()
    self:freeze()
    local thought_bubble = hero:create_sprite("menus/thinking", "thought_bubble")
    function thought_bubble:on_animation_finished()
      hero:remove_sprite(self)
      hero:unfreeze()
    end
  end

I have an animated sprite I want to put on top of the hero. If I call hero:create_sprite("my_sprite") the sprite appears, but it's stuck on frame 0. Nothing I do makes it move.

If I apply the exact same sprite to an NPC, it works as expected. This leads me to believe the hero specifically has issues dealing with sprites added at runtime.

The hero has some strict requirements on its animation sets. This may be related to #1235.

Conversation in Matrix: https://riot.im/app/#/room/!bsGTVBrdOpvunDcZEX:matrix.org/$1550453705663684TPUDi:matrix.org?via=matrix.org&via=t2bot.io

Edited Feb 18, 2019 by Alex Gleason
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking