User Tools

Site Tools


Sidebar

layout_link_object

Layout Link


Description


This Level Object is used to contain one or more Level Objects, but treat them as a single object. Any changes made to the Layout associated with the Layout Link are automatically updated in every Layout in which it is used.

Location


Right-click on an empty space in the Layout Scene Manager and choose Building Blocks > Layout Link from the list.

Properties


NAMETYPEDESCRIPTIONREAD ONLY
BRUSH
BRUSH IDstringID of the brush that created the Layout Link.TRUE
ORIENTATION
FORWARDCVector3Forward by X,Y,Z.
RIGHTCVector3Right by X,Y,Z.
UPCVector3Up by X,Y,Z.
YAWfloatYaw rotation.
POSITION
POSITIONCVector3Position by X,Y,Z world coordinates.
PROPERTIES
CAN ALIASboolControls whether or not the Layout Link can be aliased.
ENABLEDboolSet the Layout Link enabled or not.
NO ROOMPIECE COLLISIONboolRoom Pieces within the Layout Link will not have collision.
VISIBLE boolSet the Layout Link visible or not.
RESOURCES
LAYOUT FILEstringThe Layout file to load.
SCALE
SCALEfloatScale the Layout Link uniformly on the X, Y, Z axes (if set to be Scalable).
XfloatScale the Layout Link on the X axis (if set to be Scalable).
YfloatScale the Layout Link on the Y axis (if set to be Scalable).
ZfloatScale the Layout Link on the Z axis (if set to be Scalable).

Logic


Input Events

Show
Set the Layout Link to be visible.
Hide
Set the Layout Link to be invisible.
Enable
Enable the Layout Link object.
Disable
Disable the Layout Link object.
Enable and Show
Enable the Layout Link and set it to be visible.
Disable and Hide
Disable the Layout Link and set it to be invisible.
Collidable
Set the Layout Link object to be collidable.
Not Collidable
Set the Layout Link object to not be collidable.

Output Events

On Visible
This event will fire when the Layout Link receives a “Show” Input event.
On Invisible
This event will fire when the Layout Link receives a “Hide” Input event.
Enabled
This event will fire when the Layout Link receives an “Enable” Input event.
Disabled
This event will fire when the Layout Link receives a “Disable” Input event.

Examples


A few examples for what would be placed inside a Layout Link are:

  • A campfire room piece, a fire particle, a light source, and logic to turn the fire and light on and off based on time of day. (media\levelSets\props\Z1Tundra_props\Campfire_01_TOD.layout)
  • A randomized assortment of cattails and water lilies with a water ripple particle. (media\levelSets\props\Z1Tundra_props\waterplants.layout)
  • A small cave room piece and enemy spawners that warbeasts can jump out of, and a trigger box to detect when the player is near. (media\levelSets\props\Z1Tundra_props\Warbeast_den_WithTrigger.layout)
  • A large piece of outdoor scenery that randomizes between various props. (media\levelSets\props\Z1Tundra_props\Filler_Large.layout)

Even though these layout links serve very different purposes, they all have a few things in common:

  • Precise alignment between internal objects. For example, the warbeast spawners must be aligned properly with the cave so it looks like they're jumping out of the cave. Another example is the fire particle being aligned with the campfire prop. You only have to make sure that these things are aligned in a single layout and then you can use that layout link everywhere.
  • Standalone, reusable objects. You generally use layout links when you have an group of objects that you would want to place together over and over again.
  • Internal Logic that you only want to set up once. Setting up time of day or trigger boxes may not be difficult, but doing a lot of them can be tedious and error-prone. If you set it up inside a layout link, you can reuse that layout link multiple times and know that the logic will work every time. If you find a logic bug, you can fix it for every layout link at once as well.

It should be noted that these objects may contain logic inside of them, but the logic cannot be triggered by logic objects outside of the layout link. However, Layout Link Timelines can be accessed via logic in a limited manner.


Reference

layout_link_object.txt · Last modified: 2019/07/18 12:26 by anarch16sync