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
  • #1448
Closed
Open
Created Jan 06, 2020 by PhoenixII54@PhoenixII54

Custom_states don't activate side-destinated TPs when in set_can_control_movement(false)

Minimal test code

function test_sensor:on_activated()
  local s=sol.state.create()
  s:set_can_control_movement(false)
  s:set_can_control_direction(false)
  function s:on_started()
    local m=sol.movement.create("straight")
    m:set_angle(0)
    m:start(hero)
  end
  hero:start_state(s)
end

Detailed explanation

When i try to make the hero move towards a teletransporter in 'side' destinaton mode while in a custom state, it won't trigger if i disallow movement control using set_can_control_movement(false). Notes:

  1. doing set_can_control_movement(true) won't make the movement itself trigger the TP but will let the user press the corresponding direction key to do it (as expected).
  2. a movement started outside a custom state will trigger the TP regardless of any key press condition if the angle and sprite direction match the map side's.
Edited Jan 06, 2020 by PhoenixII54
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking