Author Topic: Thrown bombs should be recognized as a "thrown_item"  (Read 1193 times)

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Thrown bombs should be recognized as a "thrown_item"
« on: August 17, 2016, 03:23:04 am »
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

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1177
    • View Profile
Re: Thrown bombs should be recognized as a "thrown_item"
« Reply #1 on: August 17, 2016, 09:40:15 am »
What do you mean by "recognized as thrown_item"?

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Thrown bombs should be recognized as a "thrown_item"
« Reply #2 on: August 17, 2016, 11:19:52 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)

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1177
    • View Profile
Re: Thrown bombs should be recognized as a "thrown_item"
« Reply #3 on: August 17, 2016, 11:32:00 am »
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.