I have a widget with text that connected to text variable that change over time.
I’ve set a button that if you close the widget. click S on the keyboard the widget is closed (visibility and active)
I have a problem when I’m trying to start the widget again, the text variable is continue from the place that it was and not from the beginning.
how can I restart the text variable when restart the widget?
I tried to start the event that change the text but it’s just running 2 times.
It would give you a choice whether to update the text with Delay or not.
If you call it with this ticked, it would run Branch → True Or run the bottom False execution chain and set the text directly. You can add attributes to Event and Functions:
Thank you for your patience, but somehow i still don’t understand.
I know how to use the boolean but i don’t understand how its helping.
I have a text, dealy , text, dealy ,text …
and i want to start from the begging how does the boolean at the stat stop it from continue the code?
do I need to check every time i set the text if the boolean is true??
You do not want to reset the text variable - you want reset the Delay? So the tutorial can be restarted from the beginning? And previously triggered Delays no longer trigger?
You cannot stop a Delay - they are fire & forget and will count time even when the widget is not showing.
The easiest solution is to remove the widget from viewport / container, dereference it so it can be destroyed and then create a new one.
An alternative is to write different logic, one that reads text at specific intervals using a Timer - it’s like a Delay but you can pause / stop and reset it whenever you want.
Every time you call this event, if a tutorial was running, it will be removed. And a new one will be added. You can create reference variables by right clicking pin and promoting.