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
  • #880

Closed
Open
Created Apr 18, 2016 by Diarandor@DiarandorDeveloper

Bug: custom_entity:set_origin(origin_x, origin_y) not working???

After I create a custom entity with "map.create_custom_entity", I try to change the origin point of the entity to shift all the sprites at once. But it does not work (the sprites are not shifted).

Can someone confirm this bug? Or I am doing something wrong?

PS: I know that I could use sprite.set_xy, but in my case I am using a custom entity that can traverse anything (it is a custom sword), and to keep things simpler I prefer to change the origin and forget about the sprite shifting each time a new sprite has been created (like the stars_loading effect) or shifted by another function (if there is a custom jump while using the sword, etc).

(My goal is actually to draw the custom entity sword above the hero, which can be done drawing the sword on y-order while shifting the y-coordinate plus 2 and shifting the sprites or origin point minus 2. Since there might be several shiftings at the same time, during a jump for instance, and there might be several sprites that have to be shifted, the good solution is shifting the origin instead of the sprites.)

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