Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - froggy77

#21
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.


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

#22
Hi,

I wonder if it is possible to call a sprite, during the "enemy:on_dying()", other than this sprite "enemies/enemy_killed" , for example, for a specific type of enemy.
"enemies/enemy_killed" would be the default sprite when nothing specified.

If so, what is the way to get it?

Thank you in advance.