Page 1 of 1

Set Variable and Logic Block Issue

Posted: Wed Apr 12, 2017 5:18 am
by Tony
Hi,

I'm working on a virtual tour using an interface designed by an Agency. I'm in the V5 learning curve at the moment and i've run into an issue using variables and logic blocks. I'm seeing an issue and I'm not sure if I'm approaching the functionality in the correct way or not and I'm having some trouble tracing the error.

Here's the scenario;

Image
  1. On the opening screen is a panel containing 6 boxes. Each box links to panoramas of related content.
  2. When the user clicks on one of the boxes the panel closes, if they re-open the panel the clicked box/es show an overly indicating that they have already viewed that group of related content.
  3. There is a 'reset' button that sets all of the box overlays to 'visibilty = false"
I've created a sample file using placeholder images and panoramas to test the functionality.

http://tonyredhead.photography/p2vr/forum/logic-test/

How it should work;
  1. Click on Box #1 - Panel disappears, Panorama 1 opens, Multi-colored button appears at bottom.
  2. Select Multi-colored button returns the viewer to the initial screen and Box #1 features the 'Viewed' overlay.
  3. Click on Box #2 - Panel disappears, Panorama 2 opens, Multi-colored button appears at bottom.
  4. Click on Multi-colored button to return the to the initial screen and Box #1 & 2 feature the 'Viewed' overlay. Note: Clicking on a box already viewed will take you back to that view
  5. Click on the reset button (blue button top left) and the 'Viewed' panels disappear
Here's the issue;

All good and that's what I want to happen. Now, without refreshing the screen, if the viewer only clicks on one panel, views the panorama and then returns to the main screen the overlay isn't displayed.
  1. Click on Box #1 - Panel disappears, Panorama 1 opens, Multi-colored button appears at bottom.
  2. Click on Multi-colored button to return the to the initial screen
  3. No overlay is showing?
  4. If you were then to click on Box #2, view panorama and then return to the main screen Box #2 would show the overlay but Box #1 doesn't.
How I've implemented it;

There is a variable set in the skin with an initial value = 0

Image

Each Box has an action that sets the overlay to 'Show Element'

Each overlay has a Logic Block with the trigger 'reset_menu' that sets a value of 1 = Visible: false

Image

The 'Reset' button has an action on Mouse Click that sets the variable to 1 and the target to reset_menu

Here's a link to a YouTube video showing the issue

https://youtu.be/XI71aEs65g8

and here are the project/skin files

http://tonyredhead.photography/P2VR/For ... 20Test.zip [2.2mb]

Any help, tips and signs to the right direction I should head in gratefully accepted.

Cheers,

Tony

Re: Set Variable and Logic Block Issue

Posted: Thu Apr 13, 2017 6:13 pm
by Hopki
Hi Tony,
Ok why this is happing is because you have told all the elements to hide using a variable.
And you keep the variable in the hide state. What you need to do is set the variable back to 0 after you have reset the visibility.

An example would be for the reset container:

Mouse Down, Set Variable Value, Set(=) / 1 reset_menu
Mouse up, Set Variable Value, Set(=) / 0 reset_menu

Thus resetting to the correct state with a single click.
This will now do as you require but probably will have issues on a touch screen.

However Iv set up a few variables to do the same thing and should work well on all devices.
Please see attached.
Regards,
Hopki

Re: Set Variable and Logic Block Issue

Posted: Fri Apr 14, 2017 2:37 am
by Tony
Hopki wrote: Thu Apr 13, 2017 6:13 pm However Iv set up a few variables to do the same thing and should work well on all devices.
Hi Hopki,

Thank you so much for doing that. I have downloaded many of the skin examples you've created as examples for other people and I find them extremely helpful in understanding the methodology behind the creation of unique skins. Your help is very much appreciated.

regards,

Tony