// This is a simple explanation of the logic. // In UEFN, you mostly use the visual device connections, // but here is how the code thinks: // 1. The Game checks the player's inventory. if (Player.HasItem(Jewel)) { // 2. If the player has the Jewel... Door.Open(); // 3. ...then open the door! } else { // 4. If the player does NOT have the Jewel... Door.Lock(); // 5. ...keep the door locked. }