Page 1 of 1

I can't make a ElectricHeatingTower GUI

Posted: Sun Dec 01, 2024 7:50 pm
by yanzanon
I've never made a mod before, this is my first one.
I'm making a mod to add an Electric Heating Tower to make it more advanced, there are some things that are giving me trouble and I don't know how to solve it.
First problem:
working_light_picture, it's active all the time regardless of whether there is power or not.
Second problem:
I can't open a GUI by clicking on the entity, only with a command in the console, or with the file control.lua script.on_event(defines.events.on_selected_entity_changed)
but it's an event that just moving the mouse opens the GUI.
Third problem:
I wanted to open the GUI to be able to set the maximum temperature using a slider, so the player can adjust it as needed, and also change it through a circuit. But every time the GUI tries to access player.selected.heat_buffer.max_temperature it gives an error.
If anyone can help me

https://mods.factorio.com/mod/ElectricHeatingTower