Author Topic: Help: destructible / regenerate / lift / animation and sound  (Read 2035 times)

froggy77

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Help: destructible / regenerate / lift / animation and sound
« on: November 21, 2015, 07:59:19 pm »
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.

Diarandor

  • Hero Member
  • *****
  • Posts: 1053
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Help: destructible / regenerate / lift / animation and sound
« Reply #1 on: November 21, 2015, 08:38:28 pm »
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.”

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Help: destructible / regenerate / lift / animation and sound
« Reply #2 on: November 21, 2015, 09:13:06 pm »
Yeah, this might be a bug, if you lift a destructible, the animation "destruction" is played.
But it's kinda cool though.

froggy77

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: Help: destructible / regenerate / lift / animation and sound
« Reply #3 on: November 22, 2015, 12:53:41 am »
I use a destructible entity, not a custom entity.
Not so cool for me. 8)

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Help: destructible / regenerate / lift / animation and sound
« Reply #4 on: November 22, 2015, 01:39:00 am »
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.

Diarandor

  • Hero Member
  • *****
  • Posts: 1053
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Help: destructible / regenerate / lift / animation and sound
« Reply #5 on: November 22, 2015, 10:34:24 am »
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.”

froggy77

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: Help: destructible / regenerate / lift / animation and sound
« Reply #6 on: November 22, 2015, 12:23:53 pm »
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.

Diarandor

  • Hero Member
  • *****
  • Posts: 1053
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Help: destructible / regenerate / lift / animation and sound
« Reply #7 on: November 22, 2015, 01:16:49 pm »
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.”

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1177
    • View Profile
Re: Help: destructible / regenerate / lift / animation and sound
« Reply #8 on: November 22, 2015, 03:54:53 pm »
I confirm that you need custom entities to solve this.