I'm fairly certain not, because it's hard-coded to the conditions in the config.
One option would have been to deleteVehicle a locked gate and replace it with a setPos'd open-able version, but I don't think this is a runner in this case as the Baracken addon doesn't include both locked and open-able versions.
Consequently, I reckon you need a script to keep the door shut when the player tries to open it:
1. Name the door, I've gone for doord.
2. Create a trigger, Repeatable, named doorlock_trig
Condition: player distance doord < 10
On Activation: playernear = true; [] exec "doorlock.sqs"
On Deactivation: playernear = false
2b. For completeness' sake, add playernear = false to init.sqs
3. The door locking script#loop
~0.1
? !playernear: exit
? (doord animationPhase "Component02") > 0: doord animate ["Component02", 0]; titletext ["Locked", "PLAIN"]
goto "loop"
4. Removing the lock: once the player has acquired the key, simply deleteVehicle doorlock_trig
Notes
- The point of the doorlock_trig trigger is so that doorlock.sqs (which loops ten times a second) is only run when necessary
- Because the player has been able to start the 'Open Door' action, the whole opening door sound will play. I suggest trying to have doord say a gate rattling sound to try and obscure it.
- I uncovered Component02 as being the necessary animation by looking in the config. The principle should stand with other buildings and even other addons, as long as the necessary animation name can be determined.
- I'm appending my test mission, in case anyone wants. NB. The Take Key action should ONLY be carried out away from the gate.