Prototype/Rail: Difference between revisions
Jump to navigation
Jump to search
m (included abstract in description) |
(1.1.51: Prototype/EntityWithOwner added) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Prototype parent|Prototype/ | {{Prototype parent|Prototype/EntityWithOwner}} | ||
The abstract base of both rail prototypes. | The abstract base of both rail prototypes. | ||
Line 10: | Line 10: | ||
== Mandatory properties == | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/ | This prototype inherits all the properties from [[Prototype/EntityWithOwner]]. | ||
{{Prototype property|pictures|[[Types/table|table]]}} | {{Prototype property|pictures|[[Types/table|table]]}} | ||
Line 30: | Line 30: | ||
* curved_rail_horizontal_left_bottom - [[Types/RailPieceLayers|RailPieceLayers]] | * curved_rail_horizontal_left_bottom - [[Types/RailPieceLayers|RailPieceLayers]] | ||
* rail_endings - [[Types/Sprite8Way|Sprite8Way]] | * rail_endings - [[Types/Sprite8Way|Sprite8Way]] | ||
== Optional properties == | |||
{{Prototype property|walking_sound|[[Types/Sound|Sound]]|optional=true}} | |||
Sound played when a character walks over this rail. | |||
== Mandatory values == | == Mandatory values == | ||
Line 38: | Line 43: | ||
* curved_rail_primary_bounding_box = {-0.75, -0.55, 0.75, 1.6} | * curved_rail_primary_bounding_box = {-0.75, -0.55, 0.75, 1.6} | ||
* secondary_bounding_box = {-0.68, -2.7, 0.68, 2.7} | * secondary_bounding_box = {-0.68, -2.7, 0.68, 2.7} | ||
Furthermore, the [[Prototype/Entity#selection_box|selection_box]]es are automatically calculated from the bounding boxes, so effectively also hardcoded. |
Latest revision as of 19:27, 21 January 2022
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/Rail
The abstract base of both rail prototypes.
Extensions
- Prototype/CurvedRail curved-rail
- Prototype/StraightRail straight-rail
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithOwner.
pictures
Type: table
Table with the following mandatory members:
- straight_rail_horizontal - RailPieceLayers
- straight_rail_vertical - RailPieceLayers
- straight_rail_diagonal_left_top - RailPieceLayers
- straight_rail_diagonal_right_top - RailPieceLayers
- straight_rail_diagonal_right_bottom - RailPieceLayers
- straight_rail_diagonal_left_bottom - RailPieceLayers
- curved_rail_vertical_left_top - RailPieceLayers
- curved_rail_vertical_right_top - RailPieceLayers
- curved_rail_vertical_right_bottom - RailPieceLayers
- curved_rail_vertical_left_bottom - RailPieceLayers
- curved_rail_horizontal_left_top - RailPieceLayers
- curved_rail_horizontal_right_top - RailPieceLayers
- curved_rail_horizontal_right_bottom - RailPieceLayers
- curved_rail_horizontal_left_bottom - RailPieceLayers
- rail_endings - Sprite8Way
Optional properties
walking_sound
Type: Sound
Sound played when a character walks over this rail.
Mandatory values
All rail collision_boxes are hardcoded and cannot be modified. The hardcoded values are:
- straight_rail_primary_bounding_box = {-0.7, -0.99, 0.7, 0.99}
- diagonal_straight_rail_primary_bounding_box = {-0.65, -0.7, 0.65, 0.7}
- curved_rail_primary_bounding_box = {-0.75, -0.55, 0.75, 1.6}
- secondary_bounding_box = {-0.68, -2.7, 0.68, 2.7}
Furthermore, the selection_boxes are automatically calculated from the bounding boxes, so effectively also hardcoded.