Page 1 of 1

{solved}showing signals on a hiden entity

Posted: Sun Jul 15, 2018 12:14 pm
by CyberWizard2261
For my mod "power combinator" I want to show the circuit signals in an invisible entity to the player

I tried to set player.selected = entity to simulate the player hovering the mouse over the entity but this only sets the selected entity for a few milliseconds.

Does anyone know a way to do this? if possible I'd like to avoid reading all signal myself to show them in my GUI

Re: showing signals on a hiden entity

Posted: Mon Jul 16, 2018 1:10 pm
by eradicator
CyberWizard2261 wrote:I tried to set player.selected = entity to simulate the player hovering the mouse over the entity but this only sets the selected entity for a few milliseconds.
If i remember right it should hold until the player selects something else. So how about using on_selected_entity_changed to set it to what you want every time it changes?

Re: showing signals on a hiden entity

Posted: Mon Jul 16, 2018 3:43 pm
by CyberWizard2261
eradicator wrote: So how about using on_selected_entity_changed to set it to what you want every time it changes?
It worked! It executes 2-3 times per second but it works

Thanks again eradicator