ProjectilePrototype final_action confusion

Place to report issues and suggest improvements to the API documentation.
kelianmao
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Jan 14, 2021 5:52 pm
Contact:

ProjectilePrototype final_action confusion

Post by kelianmao »

So am I misunderstanding, or is the described behaviour of final_action inconsistent in ProjectilePrototype?

final_action :: Trigger optional
Executed when the projectile hits something, after action and only if the entity that was hit was destroyed. The projectile is destroyed right after the final_action.

piercing_damage :: float optional
Default: 0
Whenever an entity is hit by the projectile, this number gets reduced by the health of the entity. If the number is then below 0, the final_action is applied and the projectile destroyed. Otherwise, the projectile simply continues to its destination.

If piercing_damage > health of entity, and the projectile kills the entity, then what happens? According to piercing_damage, the projectile should continue, since remaining piercing_damage > 0. But according to final_action, "if the entity that was hit was destroyed", then final_action will trigger and the projectile gets destroyed? Is the description for final_action supposed to say "if the projectile is destroyed after hitting an entity"?
Post Reply

Return to “Documentation Improvement Requests”