Locking System
Last updated
Last updated
The locking system works by creating or deleting a "Locked" tag when the Locked variable is changed.
Based on this tag the Player Blueprint can check the Door or Window lock state and display the appropriate message. (See: Player Interaction System)
The Locked variable can be changed in the level by selecting the Door or Window at: Details -> Detection -> Locked
By DEFAULT, the "Locked" tag and state is changed in the Construction Script based on the Locked variable.
To change the Locked variable in Runtime Blueprint (If you want to create a key or other events), there are the Lock and Unlock events in the Event Graph.
These events can be called by reference from any other blueprint (Player, key, button, etc.) to Lock or Unlock the door or window based on a certain condition.