Cut Destructibles still trigger the "Lift" game command_effect
Essentially, you can cut destructibles and sometimes the "lift" HUD command still shows up.
To reproduce, copy this entity:
destructible{
layer = 0,
x = 376,
y = 205,
sprite = "entities/bomb",
weight = 1,
can_be_cut = true,
can_explode = true,
}
(can_explode can either be true or not, seems to be reproducible in both cases for me).
- Paste it into a game, such as Children of Solarus, which has a command_effect HUD element.
- Cut the entity with the sword
- Return to the spot where it was sitting
- "Lift" still shows up in the HUD
This does not seem to be the case when cutting entities such as bushes which automatically play a "destroy" animation and seems to have something to do with that. A workaround to prevent this, is adding a very quick "destroy" animation to whatever destructible, and this will prevent the "lift" command from showing up. Perhaps, since there is no destroy animation, the code does not fully remove the entity from the map, so the command_effect still registers?
Edited by Max Mraz