Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • 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
  • #1276
Closed
Open
Created Sep 29, 2018 by Alex Gleason@alexgleasonContributor

Feature request: add entity:get_original_position()

I need to know the entity's position as it is saved in the map. It's trivial to implement in Lua, but having this function provided would be nice. It's low priority.

My use case is for a Gust Jar type of item. Holding the item button causes objects in its path to shiver left and right by a few pixels. When you release the button it stops. At the end it needs to return to its original position, but if it's too far to the right it'll just stay there.

Example: voadi-vacuum-bug2

I fixed it in Lua by adding entity.original_position right before starting the animation on it, then entity:set_position() upon releasing the button.

How it's actually supposed to work: Screencast_from_2018-09-29_15.14.05

Edited Sep 29, 2018 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