Make a Lockable Door
Make a door show Unlock while locked, open for a player with the right key, and offer Close afterward. Start with a working interaction source and a door mesh with a hinge or animation you can control.
Configure the door and key
Create a Blueprint based on
NinjaInteractionOpenableActor. Set up the target collision and give its Smart Object an Open slot and a Close slot. On each, set the behavior type and matching runtime tag toInteraction.Type.OpenorInteraction.Type.Close. Use the immediate tree for each.Enable Starts Locked, set Key Item Query to match the intended key, and choose a Key Resolver Class. The default resolver can use Ninja Inventory keys. For a quest flag or another key system, subclass
NinjaInteractionKeyResolverand override Try Unlock With Key. Return true when the instigator can unlock this door.Use the offered action when the player presses Interact. The base door handles a locked door through the Open action. It shows the unlock text, checks the key, and opens on success. Enable automatic closing and choose a delay if the door should close by itself.
Animate the Door for Each Player
Implement ApplyOpenState and ApplyClosedState to move the mesh. When Snap To Final State is true, set the final pose immediately so a player joining later sees the correct door. Use ApplyLockedState and ApplyUnlockedState for a lock indicator. Extend the server-side Open or Close functions for gameplay, such as revealing a room, and call the parent to preserve the door's state changes.

Override CanCloseAfterOpen or CanOpenAfterClosed to restrict later uses. For a scripted unlock, call ForceUnlock on the server.
Try It in Play
Try Open without a key, then with the matching key. The first attempt should leave the door closed. The second should open it and offer Close. If an open door still offers Open, compare the offered slot with the actor's Is Open state and verify the slot runtime tags.