Help: destructible / regenerate / lift / animation and sound

Started by froggy77, November 21, 2015, 07:59:19 PM

Previous topic - Next topic
Hello,

I would like an object that can regenerate.
But, my problem is that when I tick the option to regenerate, there are two animations of destruction:
First, there is an animation of destruction (with the sound) when the hero begins to lift an object
and then, there is the same animation and the same sound when the hero is destroying this objet (after having throwing it).
The first animation is OK for a "flower bomb", not too ugly for a bush, but strange for a rock or something in wood.

Is there a way to have two animations and sounds or even delete the first animation of destruction and its sound?
I tried with metables, but I did not succeed.

Thanks in advance.

Hi! Which type of entity are you using? Destrucribles? Or custom entities?
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

Yeah, this might be a bug, if you lift a destructible, the animation "destruction" is played.
But it's kinda cool though.


strange thing is that it doesn't do the thing in Mystery of Solarus ... You might try to copy / paste a destructible event from Mystery of Solarus and test in yout project with your destructible.

I have tested destructibles with the "can regenerate" option and the same problem appears. I agree that this seems a bug.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

Thank you for your test.
I also tested with Mystery of Solarus (engine v1.4.2) and the problem is the same. It is not really a bug, but I would be happy to find a solution, even if it is just a workaround.

There is a workaround with custom entities which create destructibles. You can use a timer to check if the associated destructible has been lift or destroyed and create a new one if necessary. You also need the timer to wait in case the hero or some enemy overlap the custom entity, to avoid overlapping the new destructible with something.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."