Sector_SetLink
From ZDoom Wiki
51:Sector_SetLink (controltag, linktag, flat, type)
(development version only)
controltag: Tag of the control sector. linktag: Tag of the sector(s) to link to the control sector. flat: Whether to link the control sector's ceiling (true) or floor (false). type: Type of movement that will be linked. See below
Creates a link between multiple sectors so that they will move together. This allows for the creation of complex lifts comprised of many sectors that will hold together if their movement gets blocked by the player or another actor.
If the control tag is 0, this special will be executed when the map is loaded with the line's front sector as the control sector. If the control tag is not 0, it will be executed at run time so it can be used in scripts or with switches. The control sector will be the first one with the matching tag.
type can be a combination of the following flags:
- 1: link the target's floor to the floor or ceiling (specified by flat) of the control sector
- 2: link the target's ceiling to the floor or ceiling (specified by flat) of the control sector
- 4: the floor movement is the opposite direction as the control sector's flat (bit 1 is required)
- 8: the ceiling movement is the opposite direction as the control sector's flat (bit 2 is required)
If type is 0 the sectors will be unlinked from the control sector.

