1-- Lua script of map water_dungeon_hallway. 2-- This script is executed every time the hero enters this map. 3 4-- Feel free to modify the code below. 5-- You can add more events and remove the ones you don't need. 6 7-- See the Solarus Lua API documentation: 8-- http://www.solarus-games.org/doc/latest 9 10local map = ... 11local game = map:get_game() 12 13-- Event called at initialization time, as soon as this map becomes is loaded. 14function map:on_started() 15 16 -- You can initialize the movement and sprites of various 17 -- map entities here. 18 19 -- Fix block teletransporter behavior: https://gitlab.com/solarus-games/solarus/issues/725 20 for transporter in map:get_entities_by_type("teletransporter") do 21 function transporter:on_activated() 22 for overlap in map:get_entities_in_region(transporter) do 23 if overlap:get_type() == "block" then 24 overlap:reset() 25 end 26 end 27 end 28 end 29 30end 31 32-- Event called after the opening transition effect of the map, 33-- that is, when the player takes control of the hero. 34function map:on_opening_transition_finished() 35 36end 37