Ent:Fire checks?

Hey, sorry for the semi-shit post but I was just wondering if there’s any way to check (let’s say if a door is unlocked or not) from ent:Fire(“unlock”, 0)
I’ve tried looking for a meta function for IsUnlocked and similar but I couldn’t find anything.
Help would be much appreciated :slight_smile:

Get key values is something that isn’t really easily accessible in gLua. I know TFlippy (a talented mapper) ran into similar issues because we have SetKeyValue and GetKeyValues is broken

What most door systems do is that they just store a value on the door.

entity.locked = true

Not all inputs will let you do this, but in the case of doors, you can do this:

door:GetSaveTable( ).m_bLocked

If you install the source code from the sdk you can browse most of the ( outdated ) code that isn’t hidden away inside the engine. Spaghetti code abounds, but you can find all sorts of useful things in there.