When I try to open the radar GUI, the on_gui_opened event is not triggered.
Code: Select all
script.on_event({
defines.events.on_gui_opened
}, function(event)
game.players[event.player_index].print("Event: Actived")
end)
Code: Select all
script.on_event({
defines.events.on_gui_opened
}, function(event)
game.players[event.player_index].print("Event: Actived")
end)
A table is totally fineOsmo wrote: Tue Jul 29, 2025 9:57 am You are wrapping defines.events.xxx in parentheses, thus providing a table when the on_event function expects a defines.events number or a string of the same name. Remove the {} and it should work. (assuming radars even have gui, i don't remember if they do with energy sources other than burner)
Actually, any entity can have that, its called a stateless visualisation, an animation that plays regardless of the state of the entity or the game. Creating a continuos looping animation is easy.yaim904 wrote: Tue Jul 29, 2025 7:25 pm 1. The animation is infinite from the moment it is created (without player intervention).
Thanks for the information, I didn't know that property worked that way.