Prototype/Projectile: Difference between revisions
m (Protected "Prototype/Projectile": Migrated prototype doc to separate website ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
(Updated styling of prototype doc migration note) |
||
Line 1: | Line 1: | ||
'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/ProjectilePrototype.html https://lua-api.factorio.com/latest/prototypes/ProjectilePrototype.html] | <div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/ProjectilePrototype.html https://lua-api.factorio.com/latest/prototypes/ProjectilePrototype.html] | ||
This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums]. | </p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div> | ||
Revision as of 10:43, 21 September 2023
The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/ProjectilePrototype.html
This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.
Template:Prototype parent Entity with limited lifetime that can hit other entities and has triggers when this happens.
Mandatory properties
This prototype inherits all the properties from Prototype/Entity.
Template:Prototype property Must be != 0 if turning_speed_increases_exponentially_with_projectile_speed is true.
Optional properties
Template:Prototype property Whether the animation of the projectile is rotated to match the direction of travel.
Template:Prototype property Setting this to true can be used to disable projectile homing behaviour.
Template:Prototype property When true the entity is hit at the position on its collision box the projectile first collides with. When false the entity is hit at its own position.
Template:Prototype property
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.
Template:Prototype property Must be greater than or equal to 0.
Template:Prototype property Must be greater than or equal to 0.
Template:Prototype property Executed when the projectile hits something.
Template:Prototype property
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.