Cover image of Upcoming Changes to the Door Component in Update 1.6

With the arrival of Update 1.6, the Door System is undergoing a significant refactor that will impact how scripters interact with door-related components in the game. The update aims to make door behaviors more extendable, but it does introduce some breaking changes that require attention in existing scripts and mods.

What’s Changing?

The biggest change is the change of inheritance hierarchy for doors. Previously, the DoorComponent class was used as the rotating door class and the absolute base class for all doors, and SlidingDoorComponent derived from it as a sliding door. Now, the codebase introduces the more generic BaseDoorComponent, which serves as a base class for all types of doors (rotating, sliding, or custom in the future). 

Below, we detail the most common scenarios affected by this update and what you’ll need to update in your content.


1. Script Usage of DoorUserAction and Its GetDoorComponent Method

Before 1.6:

DoorComponent door = DoorUserAction.GetDoorComponent();

After 1.6:

  • BREAKING CHANGE: The return type of GetDoorComponent has changed from DoorComponent to BaseDoorComponent.

  • Impact: If your script is written to expect a DoorComponent, it will fail to compile.

How to fix:
Update your scripts to accept a BaseDoorComponent and then check or cast for a more specific type only if needed (with type-checking!):

BaseDoorComponent baseDoor = DoorUserAction.GetDoorComponent();
if (baseDoor.IsKindOf(SlidingDoorComponent))
{
SlidingDoorComponent slidingDoor = SlidingDoorComponent.Cast(baseDoor);
// Sliding door-specific logic
}

2. Detection of Any Door Type Using DoorComponent

Before 1.6:
Content that checks specifically for DoorComponent will now miss new door subclasses (like SlidingDoorComponent), meaning some doors may not be recognized by your old scripts, even though the game won't throw an explicit error. The loss here is in functionality, not compilation.

Symptoms:

  • Doors (especially new/sliding/custom variants) might not animate or react to your triggers/scripts because you’re filtering by the more derived DoorComponent class.

How to fix:
Use the more generic BaseDoorComponent base class when scanning entities for door components:

BaseDoorComponent door = BaseDoorComponent.Cast(building.FindComponent(BaseDoorComponent)); // Obtain from context

3. Casting DoorComponent to SlidingDoorComponent

Before 1.6:
Some scripts performed checks like:

DoorComponent doorComponent= DoorComponent.Cast(building.FindComponent(DoorComponent));
SlidingDoorComponent slidingDoor = SlidingDoorComponent.Cast(doorComponent);

With 1.6:
Due to change in hierarchy, SlidingDoorComponent is not a type of DoorComponent anymore and it's no longer possible to cast from a DoorComponent to a SlidingDoorComponent, and thus the script will fail to compile.

How to fix:
Cast from BaseDoorComponent to SlidingDoorComponent

BaseDoorComponent baseDoor= BaseDoorComponent.Cast(building.FindComponent(BaseDoorComponent));

SlidingDoorComponent slidingDoor = SlidingDoorComponent.Cast(baseDoor);

For documentation: BaseDoorComponent – Arma Reforger - Bohemia Interactive Community

Published on 

We want you for our mailing list!

We offer great content once a month just for you!