Adding Timer functions to your project

The place for any Hollywood Designer tutorials
Post Reply
amyren
Posts: 368
Joined: Thu May 02, 2019 11:53 am

Adding Timer functions to your project

Post by amyren »

Not sure if this qualify as a tutorial, but I just wanted to share this tip in case anyone miss the hollywood Start/pause/stop timer features in designer.

To have a similar function.
1. Add an action object in object manager
2. Edit it and add a delay. Set it to a value to reflect the resolution of your timer. If 1 second accuracy is sufficient, set it to 1000
3. Add a Set variable event. Name it eg. Timer1 and set the value to Timer1+1
4. Tick the boxes for Run Action events acyncronously, Loop action events and Passive mode.

Now you have a timer which you can start or stop by calling the events Start Action and Stop Action. In this case Stop Action will act as PauseTimer.
Use Check condition to take action if the Timer1 has reached the wanted time.
To restart the timer, just use 'SetVariable and set the value of Timer1 to 0
Post Reply