Prototype/Beam: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Updated styling of prototype doc migration note)
(Removed old prototype docs)
 
Line 2: Line 2:


</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>
</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>
{{Prototype parent|Prototype/Entity}}
Used as a laser beam.
{{Prototype TOC|beam}}
== Mandatory properties ==
This prototype inherits all the properties from [[Prototype/Entity]].
All animations must have the same number of frames: Tail must have same number of frames as start, ending, head, body, start_light, ending_light, head_light, tail_light and body_light.
{{Prototype property|width|[[Types/double|double]]}}
{{Prototype property|damage_interval|[[Types/uint32|uint32]]}}
Damage interval can't be 0. A value of 1 will cause the attack to be applied each tick.
{{Prototype property|head|[[Types/Animation|Animation]]}}
Head segment of the beam.
{{Prototype property|tail|[[Types/Animation|Animation]]}}
Tail segment of the beam.
{{Prototype property|body|[[Types/AnimationVariations|AnimationVariations]]}}
Body segment of the beam. Must have at least 1 variation.
== Optional properties ==
{{Prototype property|action|[[Types/Trigger|Trigger]]|optional=true}}
{{Prototype property|target_offset|[[Types/vector|vector]]|optional=true}}
{{Prototype property|random_target_offset|[[Types/bool|bool]]|false|optional=true}}
{{Prototype property|action_triggered_automatically|[[Types/bool|bool]]|false|optional=true}}
Whether this beams should trigger its action every damage_interval. If false, the action is instead triggered when its owner triggers shooting.
{{Prototype property|random_end_animation_rotation|[[Types/bool|bool]]|true|optional=true}}
{{Prototype property|transparent_start_end_animations|[[Types/bool|bool]]|true|optional=true}}
{{Prototype property|start|[[Types/Animation|Animation]]|optional=true}}
Start point of the beam.
{{Prototype property|ending|[[Types/Animation|Animation]]|optional=true}}
End point of the beam.
{{Prototype property|light_animations|[[Types/table|table]]|optional=true}}
Lights are additively accumulated onto lightmap, which is multiplicatively rendered on the game world.[https://forums.factorio.com/viewtopic.php?p=435042#p435042]
Table with the following members:
* start - [[Types/Animation|Animation]] - Optional.
* ending - [[Types/Animation|Animation]] - Optional.
* head - [[Types/Animation|Animation]] - Optional.
* tail - [[Types/Animation|Animation]] - Optional.
* body - [[Types/AnimationVariations|AnimationVariations]] - Optional.
{{Prototype property|ground_light_animations|[[Types/table|table]]|optional=true}}
Table with the following members:
* start - [[Types/Animation|Animation]] - Optional.
* ending - [[Types/Animation|Animation]] - Optional.
* head - [[Types/Animation|Animation]] - Optional.
* tail - [[Types/Animation|Animation]] - Optional.
* body - [[Types/AnimationVariations|AnimationVariations]] - Optional.
{{Prototype property|start_light|[[Types/Animation|Animation]]|optional=true}}
This and the below properties ending in "_light" are considered deprecated. If they are present, then <code>light_animations</code> and <code>ground_light_animations</code> are not loaded.
{{Prototype property|ending_light|[[Types/Animation|Animation]]|optional=true}}
{{Prototype property|head_light|[[Types/Animation|Animation]]|optional=true}}
{{Prototype property|tail_light|[[Types/Animation|Animation]]|optional=true}}
{{Prototype property|body_light|[[Types/AnimationVariations|AnimationVariations]]|optional=true}}

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/prototypes/BeamPrototype.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.