Hello,
I don't understand how to activate/reactivate a simple switch without reloading the map.
I works for crystal blocks, I would like the same behavior for a "light switch" to turn on / turn off the light and I would select my own sprites.
It's the same problem for the switch in the "test map" called Outside B2 (Village) of the tutorial. If I want to disappear again the ladder of the map, how should I do?
Once enabled, the switch (crystal) remains in yellow and can not be hit with the sword.
I don't understand how to activate/reactivate a simple switch without reloading the map.
I works for crystal blocks, I would like the same behavior for a "light switch" to turn on / turn off the light and I would select my own sprites.
It's the same problem for the switch in the "test map" called Outside B2 (Village) of the tutorial. If I want to disappear again the ladder of the map, how should I do?
Once enabled, the switch (crystal) remains in yellow and can not be hit with the sword.
Code Select
local map = ...
local game = map:get_game()
function light_switch:on_activated()
light_tile:set_visible(false)
end
function light_switch:on_inactivated()
light_tile:set_visible(true)
end