Hello
I was wondering if Garry’s Mod has a way of recursively creating items like how C# does for example. In C# you can create a List as store things inside it (including your own classes). I was wondering if this was in anyway possible in Garry’s Mod’s Lua.
Here is my pseudo/lua thinking
myFrames = {}
for k,v in pairs(myTable) do
local backFrame = vgui.Create( "DFrame" )
backFrame:SetPos( ScrW() / 2 - 500, ScrH() / 2 - 300 )
backFrame:SetSize( 1000, 600 )
table.insert(myFrames, backFrame)
end
Would these still work, I am just confused, is there a better way to do this?