Types/ProjectileAttackParameters: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (word)
(Removed old prototype docs)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Extends [[Types/BaseAttackParameters]].
<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/types/ProjectileAttackParameters.html https://lua-api.factorio.com/latest/types/ProjectileAttackParameters.html]


== Optional properties ==
</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>
Inherits all properties from [[Types/BaseAttackParameters]].
 
=== projectile_center ===
'''Type''': [[Types/vector]]
 
'''Default''': {0, 0}
 
Offsets what the turret's sprite looks at. Setting to {0,1} will cause the turret to aim one tile up from the target but the projectile will still aim for the entity. Can be used to give the illusion of height but can also confuse aim logic when set too high.
 
=== projectile_creation_distance ===
'''Type''': [[Types/float]]
 
'''Default''': 0
 
=== shell_particle ===
'''Type''': [[Types/CircularParticleCreationSpecification]]
 
Used to show bullet shells/casings being ejected from the gun, e.g. [https://factorio.com/blog/post/fff-345 artillery shell casings].  
 
=== projectile_creation_parameters ===
'''Type''': [[Types/CircularProjectileCreationSpecification]]
 
Used to shoot projectiles from arbitrary points. Used by worms and multi-barreled weapons. Use multiple points with the same angle to cause the turret to shoot from multiple barrels. If not set then the launch positions are calculated using projectile_center and  projectile_creation_distance.
 
=== projectile_orientation_offset ===
'''Type''': [[Types/float]]
 
'''Default''': 0
 
Used to shoot from different sides of the turret. Setting to 0.25 shoots from the right side, 0.5 shoots from the back, and 0.75 shoots from the left. The turret will look at the enemy as normal but the bullet will spawn from the offset position. Can be used to create right-handed weapons.

Latest revision as of 14:32, 25 October 2024

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/types/ProjectileAttackParameters.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.