Request: Allow function as parameter of hero:save_solid_ground()
Allow a function as parameter of the method hero:save_solid_ground(). The function must return a coordinate (x,y,layer), where the hero would be set in case of falling in bad grounds (hole, water, lava,...).
This would be very useful in several situations allowing more customization. For example, in case the hero falls from a moving platform that is floating over a large hole, with the new function we could make the hero appear on the center of the platform. (The function would be called/created using a collision test with the platform, and destroyed an instant later as soon as the hero walks over solid ground out of the platform. It should not be hard to do this.)
The default behaviour of the engine would make the hero appear where he was before falling, but since the platform has moved, that ground could be a hole. Also, using hero:save_solid_ground(x,y,layer) before to make the hero appear at the entrance of the room or other fixed place could be bad, since this could ruin complex puzzles of the map (for instance, if there is a puzzle of several buttons opening and closing ways for the hero, the player could "cheat" jumping on the hole to reappear in another part of the room that was not accesible in the current state of the puzzle-door puzzle).
Besides, the new function would allow to solve with more customization the following well-known problem: if a stream pushes the hero into a hole, the hero reappears next to the hole, and he falls again and again into the hole (of course, to use the new function one would need to use scripted streams created with custom entities, and a similar trick as with the platform problem).
Of course, there could be more important uses for this function. Did I convince you? :)