Code: Select all
elements = my_gui[preview_frame]
for e, entity in pairs(entities) do
element = entity.name.."-camera"
elements.add{
type = "camera",
name = element,
zoom = zoom,
surface_index = entity.surface.index,
position = {entity.position.x, entity.position.y - OFFSET},
}
…
end
I've compared the values of different prototypes, but their respective selection_box, collision_box, and drawing_box had identical values. Height/size of animations is what I'd really need, but that information is only available during the data stage.
The different entities I want to show in my GUI come from different mods, so I'm not really in control of them. Is there a way to get the size of graphics of random entities during the control stage?