Howto delay in ES [SOLVED]

I want to delay an action. In my case I would like delay a mouse hoover to show a context info panel. Means only if the mouse pointer rest for a second it should show the context info.
I currently do this with a Delay and Hoover component, but then I have to poll the Delay component. Maybe that is the solution. But I hope there is a similar pattern like decay system which handels this very generic.
I need that delay thing in other places too. Thats why I ask.

To me, that’s all visualization stuff and never comes into the ES. For example, why does the server need to know you are hovering on a UI component?

ok, the visualisation of models are also done by ES? The context visualisation is here to show context info, but only if it is hoovered. So I’m not completely sure I understand what you mean by “why does the server need to know …”. I dont have a server.

Well does it change gamestate? (hence the server question)
Probably not, so just do it like with any other ui technique.

Everything that does not change gamestate based on gamestate or input is visualisation basically.

Yes, this.

You do not need to keep track of the mouse in the ES… because that’s visualization only.

When you think of “things that are in an ES”… think of a client and a server. What would the server need to know? If the server doesn’t need to know it then it isn’t game state.

I needed a delay in Zay-ES so I created a Countdown component that took a countdown time and a Component Class ( which gets added to the entity once the timer runs down), then handled all entities with countdown classes in a simple countdown manager. It worked fine until I tried at add multiple countdowns to a single entity, I fixed this by tweaking the Countdown component to be a CountdownQue that has a list of countdowns for a given entity.

it may be a bit messy, I have been meaning to talk it over with @pspeed to get his input on how best to handle entites that need multiple copies of a single component.

It’s a sign that you really have multiple entities.

Edit: and either way, OP’s desire for such countdown a thing is misguided in his particular use-case.

@pspeed: Ok I’ll keep in mind this guidance with client server. So in this case you might be right and I should not solve my delay with ES.
@thetoucher: Thanks with that I can solve my talk system problem which has also a delay (should wait until opponent talk has finish befor show the next selection of possible sentence).

Thanks to everybody :smile: