How to check if func_button is locked

How can I check to see if a button made in hammer is locked?

Put a light triggered to it, then try the button and if the lights opens, it means its unlocked

Erm I meant in the terms of lua.


Think thats what your looking for then to unlock it if it is locked


I think that only checks if it spawns locked though.

Well, since only the server can fire the “Lock” input then wherever you’re doing that just set button.locked = true or something.

Maps can set buttons to locked and thats what this is doing.

Oh. Well, I don’t think there’s any way to tell when something fires an input unless it has a corresponding output (and that’s still impossible).

Oh alright, Yeah I had it the way you said before but then I overlooked what to do when the map locks it.