Prototype/Projectile: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(direction_only desc)
(1.0.0: added speed_modifier, turning_speed_increases_exponentially_with_projectile_speed, animation now optional)
Line 6: Line 6:
== Mandatory properties ==
== Mandatory properties ==
This prototype inherits all the properties from [[Prototype/Entity]].
This prototype inherits all the properties from [[Prototype/Entity]].
{{Prototype property|animation|[[Types/Animation|Animation]]}}


{{Prototype property|acceleration|[[Types/double|double]]}}
{{Prototype property|acceleration|[[Types/double|double]]}}


== Optional properties ==
== Optional properties ==
{{Prototype property|animation|[[Types/Animation|Animation]]|optional=true}}


{{Prototype property|rotatable|[[Types/bool|bool]]|true|optional=true}}
{{Prototype property|rotatable|[[Types/bool|bool]]|true|optional=true}}
Line 32: Line 32:
Must be greater than or equal to 0.
Must be greater than or equal to 0.


{{Prototype property|turn_speed|[[Types/float|float]]|1|optional=true}}
{{Prototype property|turn_speed|[[Types/vector|vector]]|<nowiki>{1, 1}</nowiki>|optional=true}}
 
{{Prototype property|speed_modifier|[[Types/float|float]]|1|optional=true}}
Must be greater than or equal to 0.
Must be greater than or equal to 0.


Line 48: Line 50:


{{Prototype property|hit_collision_mask|[[Types/CollisionMask|CollisionMask]]|<nowiki>{"player-layer", "train-layer"}</nowiki>|optional=true}}
{{Prototype property|hit_collision_mask|[[Types/CollisionMask|CollisionMask]]|<nowiki>{"player-layer", "train-layer"}</nowiki>|optional=true}}
{{Prototype property|turning_speed_increases_exponentially_with_projectile_speed|[[Types/bool|bool]]|false|optional=true}}


{{Prototype property|shadow|[[Types/Animation|Animation]]|optional=true}}
{{Prototype property|shadow|[[Types/Animation|Animation]]|optional=true}}

Revision as of 11:51, 8 September 2020

Template:Prototype parent Entity with limited lifetime that can hit other entities and has triggers when this happens.

Template:Prototype TOC

Mandatory properties

This prototype inherits all the properties from Prototype/Entity.

Template:Prototype property

Optional properties

Template:Prototype property

Template:Prototype property Whether the animation of the projectile is rotated to match the direction of travel.

Template:Prototype property

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

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

Template:Prototype property Must be greater than or equal to 0.

Template:Prototype property

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.

Template:Prototype property

Template:Prototype property

Template:Prototype property

Template:Prototype property

Template:Prototype property