Types/ProjectileTriggerDelivery: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page with "Extends Types/TriggerDelivery. == Mandatory properties == === projectile === '''Type''': Types/string Name of a Prototype/Projectile. === starting_speed === ''...")
 
(Updated styling of prototype doc migration note)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<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/ProjectileTriggerDelivery.html https://lua-api.factorio.com/latest/types/ProjectileTriggerDelivery.html]
</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>
Extends [[Types/TriggerDelivery]].
Extends [[Types/TriggerDelivery]].


Line 10: Line 16:
=== starting_speed ===
=== starting_speed ===
'''Type''': [[Types/float]]
'''Type''': [[Types/float]]
Starting speed in tiles per tick.


== Optional properties ==
== Optional properties ==
Line 23: Line 31:


'''Default''': 0
'''Default''': 0
Maximum deviation of the projectile from source orientation, in +/- ( x radians / 2). Example: 3.14 radians -> +/- (180° / 2), meaning up to 90° deviation in either direction of rotation.


=== range_deviation ===
=== range_deviation ===
Line 28: Line 38:


'''Default''': 0
'''Default''': 0
The maximum deviation of the projectile max range from <code>max_range</code> is <code>max_range × range_deviation ÷ 2</code>. This means a deviation of .5 will appear as a maximum of .25 (25%) deviation of an initial range goal. Post-deviation range may exceed max_range or be less than min_range.


=== max_range ===
=== max_range ===

Latest revision as of 10:42, 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/types/ProjectileTriggerDelivery.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.


Extends Types/TriggerDelivery.

Mandatory properties

projectile

Type: Types/string

Name of a Prototype/Projectile.

starting_speed

Type: Types/float

Starting speed in tiles per tick.

Optional properties

Inherits "source_effects" and "target_effects" properties from Types/TriggerDelivery.

starting_speed_deviation

Type: Types/float

Default: 0

direction_deviation

Type: Types/float

Default: 0

Maximum deviation of the projectile from source orientation, in +/- ( x radians / 2). Example: 3.14 radians -> +/- (180° / 2), meaning up to 90° deviation in either direction of rotation.

range_deviation

Type: Types/float

Default: 0

The maximum deviation of the projectile max range from max_range is max_range × range_deviation ÷ 2. This means a deviation of .5 will appear as a maximum of .25 (25%) deviation of an initial range goal. Post-deviation range may exceed max_range or be less than min_range.

max_range

Type: Types/double

Default: 1000

min_range

Type: Types/double

Default: 0