Simple test code below, guiImgEnt is the entity-preview element, and it doesn't do diddly.
What am I screwing up? HELP!
Code: Select all
function MakeGUI(player, entity)
player.gui.center.clear()
local guiFrame = player.gui.center.add{
type="frame",
name="guiFrame",
direction="vertical"
}
local guiFrameImg = guiFrame.add{
type="frame",
name="guiFrameImg",
direction="vertical",
caption=entity.name
}
local guiImgEnt = guiFrameImg.add{
type="entity-preview",
name="guiImgEnt",
entity=entity
}
guiImgEnt.entity = entity
local guiFrameInp = guiFrame.add{
type="frame",
name="guiFrameInp",
direction="vertical",
caption="Inputs"
}
local guiTblInp = guiFrameInp.add{
type="table",
name="guiTblInp",
column_count=3,
draw_vertical_lines=true,
draw_horizontal_lines=true,
draw_horizontal_line_after_headers=true
}
end