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
{solved}showing signals on a hiden entity
-
- Inserter
- Posts: 23
- Joined: Tue Jun 26, 2018 11:01 am
- Contact:
{solved}showing signals on a hiden entity
Last edited by CyberWizard2261 on Mon Jul 16, 2018 3:46 pm, edited 1 time in total.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: showing signals on a hiden entity
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?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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Inserter
- Posts: 23
- Joined: Tue Jun 26, 2018 11:01 am
- Contact:
Re: showing signals on a hiden entity
It worked! It executes 2-3 times per second but it workseradicator wrote: So how about using on_selected_entity_changed to set it to what you want every time it changes?
Thanks again eradicator