Get Hammer Entity properties with lua

I tried for quite a while and also checked the wiki aswell as searching the forums but i had no luck so far.

In Hammer i created an entity called “garage_panel” and i gave it a property called “Target” with the value “garage_door_1”.
Iin lua i need to get this peroperty.

Is there any sort of function for this? As in self:GetProperty(“Target”)?

Im thankful for all input!
Brooke

I think

Entity:GetKeyValues is what you’re looking for. The following should work:


self:GetKeyValues()["Target"]

If that doesn’t work, I recommend asking in the Developer Discussion forum instead :smile:

That’s working like a charm… Thank you very much, sir!