LuaGuiElement type camera does not work

Place to get help with not working mods / modding interface.
Post Reply
aaaaaaaaaaaaaaaaaa8
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Jun 06, 2017 9:11 am
Contact:

LuaGuiElement type camera does not work

Post by aaaaaaaaaaaaaaaaaa8 »

Suppose I want to create a camera on an entity position. Given surface, entity and frame, I used

Code: Select all

frame.add{
    type="camera",
    name="entity_camera",
    position=entity.position,
    surface_index=surface.index
}
It does not show anything. How do I make it show the camera? Thanks

Pandemoneus
Fast Inserter
Fast Inserter
Posts: 127
Joined: Fri May 08, 2015 2:25 pm
Contact:

Re: LuaGuiElement type camera does not work

Post by Pandemoneus »

I recommend you take a look at Factorissimo 2, in control.lua, lines 869-873.
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: LuaGuiElement type camera does not work

Post by Klonan »

aaaaaaaaaaaaaaaaaa8 wrote:Suppose I want to create a camera on an entity position. Given surface, entity and frame, I used

Code: Select all

frame.add{
    type="camera",
    name="entity_camera",
    position=entity.position,
    surface_index=surface.index
}
It does not show anything. How do I make it show the camera? Thanks
You will need to give the element style a minimal width and minimal height

Post Reply

Return to “Modding help”