Timer countdown

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
SergePix
Posts: 33
Joined: Fri Feb 01, 2019 2:27 pm

Timer countdown

Post by SergePix » Tue Mar 26, 2019 10:20 pm

I would like to display a count down from 10 sec.

I create a variable:
name: compteur
Type: Number
Init Value: 10

I create a timer:
Type: init
Timeout: 10
Repeat: one time
Actions:
Source: Activate
Action: set Variable Value
Parameters: Sub(-)/1
Target: compteur

I create a text field:
Name: countdown
Apparence: visible
Text: $(*compteur)

The countdown does not work. The text field (countdown) displays 10.

Where is my mistake?
Serge
Version: 6.1 beta2a pro 64bit
Windows 10

SergePix
Posts: 33
Joined: Fri Feb 01, 2019 2:27 pm

Re: Timer countdown

Post by SergePix » Wed Mar 27, 2019 2:33 am

I found a solution.

Here it is;

Variable:
name: compteur
Type: Number
Init Value: 10

Timer:
Apparence: visible:on - Logic Block: Trigger: Active / Comparison: = / Visible: false
Type: init
Timeout: 0.500
Repeat: Toggle
Actions: Source: Deactivate / Action: set Variable Value / Parameters: Sub(-)/1 / Target: compteur

Text field:
Apparence: visible: on - Logic Block: Trigger: compteur / comparison:= / Visible:false
Text: Logic Block: Trigger : compteur / Comparrison: = / Value: 0 / Text:0
Text: Logic Block: Trigger : compteur / Comparrison: = / Value: 1 / Text:1
Text: Logic Block: Trigger : compteur / Comparrison: = / Value: 2 / Text:2
...
Repeat Logic Block of the text until 10
Serge
Version: 6.1 beta2a pro 64bit
Windows 10

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests