Thrown bombs should be recognized as a "thrown_item"

Started by MetalZelda, August 17, 2016, 03:23:04 AM

Previous topic - Next topic
Hi.

This is something I'm facing while creating enemies.
Destructibles are recognized as "thrown_item" if it has been defined in the enemy script, but build_in bombs are not recognized as "thrown_item", this is a bit weird, bombs can be thrown by the hero, just like a destructible


Quote from: Christopho on August 17, 2016, 09:40:15 AM
What do you mean by "recognized as thrown_item"?

Oh I forgot to add this

it should be useful and more logical for functions such as enemy:on_custom_attack_received(attack, sprite)

Ok, so you mean recognized as the "thrown_item" attack to hurt enemies?

Thrown bombs are regular thrown items, but with a damage value of zero so indeed, they don't hurt enemies when they hit them. Only their explosion can hurt them. I don't think I will allow to customize built-in bombs more, because built-in bombs only exist for historical reasons. By the way, built-in bombs have other problems like the non-customizable delay and the fact that they immediately explode when reaching the ground.

The better solution will be to allow to lift arbitrary entities (instead of only destructibles, bombs and signs). It is easy to make bombs as custom entities, and when this lift feature is done it will be easy to make them liftable and throwable.