SOLVED - Element Timer Countdown?

Q&A about the latest versions
Post Reply
User avatar
TheRealMojoJojo
Posts: 341
Joined: Thu Sep 20, 2018 10:18 pm

Hi,
I'll try to explain the best I can as to what I am trying to accomplish :-)

1. I have an animated hotspot that is NOT visible by default.
2. When you click on a button, the animated hotspot becomes visible.
3. After 5 seconds I would like the animated hotspot to become invisible again.

I have been trying to understand how to do this by watching multiple tutorial videos on timers and logic but for the life of me cannot seem to get it to work.

Anyone have a solution? Thanks!!!
Last edited by TheRealMojoJojo on Thu Jul 25, 2019 8:32 pm, edited 1 time in total.
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,

Here's the solution :-)

https://p2vrlittlebits.s3-ap-southeast- ... index.html

In this example I've...

1. Created a variable called 'showGif' and set the value to False
2. The animated gif element has Visibility unchecked and a logic block *showGif = true | Visible = true
3. I have a timer (timer-hide-animated-gif) of Type = Manual > Repeat = One Time. The timer has an action Source = Deactivate | Action = Set Variable Value | Parameters = Set(=) /false | Target = showGif
4. I have a button with a logic block *showGif = true | Visible = false. The button has two actions.
Action 1: Source = Mouse Click | Action = Set Variable Value | Parameters = Set(=) /true | Target = showGif
Action 2: Source = Mouse Click | Action = Set Value | Parameters = 5 | Target = timer-hide-animated-gif

So when you click the button it sets the variable to true which makes the animated gif visible, at the same time the logic block hides the button, it also send a value to the timer of 5 which starts the timer. After 5 seconds the timer deactivates which set the Action to change the variable to false which hides the animated gif and shows the button.

I've attached the skin.

cheers,

Tony
Attachments
animated-gif-hotspot-timer.ggsk
(1.49 KiB) Downloaded 145 times
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
TheRealMojoJojo
Posts: 341
Joined: Thu Sep 20, 2018 10:18 pm

Thank you SOOOOOOO very much for that Tony! I'm still a little most as to how it works but was able to implement it into a tour and it works perfectly so thanks for taking the time to help me out!
Post Reply