Element or hotspot counter

Q&A about the latest versions
KMiddelkoop
Posts: 26
Joined: Thu May 30, 2019 1:47 pm

Mon Feb 10, 2020 7:04 pm

Hello Guys,

There is the ability for showing checked boxes for visited nodes. I am wondering if I could create one sort of counter for visited/or activated hotspots. It should be used for different hotspot types.

So when started, the counter should say for example:
0 / 8 where 0 is for the fresh start with none activated spots, and 8 for the available spots.

When clicked on one of the spots, the 0 should become 1. Does this make sense, and could this be created with a text element in the skin editor?

Thank you in advance for your thoughts.

Kevin
KMiddelkoop
Posts: 26
Joined: Thu May 30, 2019 1:47 pm

Tue Feb 11, 2020 1:19 pm

The idea is to show the visitor of the tour how much of the tour is explored (i.e. 5 of 8 hotsphots are visited, 3 of 8 are not.) Hopefully this is something one of you have already worked with.
User avatar
Hopki
Gnome
Posts: 10623
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Tue Feb 11, 2020 6:17 pm

Hi,
I have found a very old project but having a quick look at it, it raises questions.

You could have a bar that has all the nodes listed and the nodes change colour as you have visited them.
Of if you want like a fule gauge type thing where it just goes up, but no indication of what nodes you have not seen.
But this is for nodes of a tour.

Your question is referring to hotspots in one node? or hotspots on many?
Regards,
Hopki
Hopki
Garden Gnome Software Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
KMiddelkoop
Posts: 26
Joined: Thu May 30, 2019 1:47 pm

Tue Feb 11, 2020 7:25 pm

Hi Hopki,

Thanks for your reply. I am looking for a fixed number of hotspots. For example 5. They are situated in one node. I try to create a game where visitors have to find and activate 5 spots which open an image in a pop up window.

Do you think this is possible? I’ve seen something with a colores bar before as well. I don’t know how that was built but that could be with nodes instead of hotspots.

Thanks for your efforts Hopki. I hope you can point me in a direction.

Best,
Kevin
User avatar
Tony
Posts: 985
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Wed Feb 12, 2020 12:18 am

Hi Kevin,

Here's something I'd made a while ago. It could certainly be modified to open an image once the hotspot count had reached the desired number.


hover_buttons_variables15.jpg
hover_buttons_variables15.jpg (366.42 KiB) Viewed 1946 times


https://p2vrtutorials.s3-ap-southeast-2 ... index.html

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 985
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Wed Feb 12, 2020 12:41 am

Hi Kevin,

I just updated the project to add in a popup image at the end.

hotspot_counter_image.jpg
hotspot_counter_image.jpg (526.69 KiB) Viewed 1946 times

When you click on a hotspot an info window pops up, you have to click the close button to hide it. After all three hotspots have been Mouse Clicked the 'reset' button is displayed. The third info popup close button triggers the image popup.

https://p2vrtutorials.s3-ap-southeast-2 ... index.html

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
User avatar
Hopki
Gnome
Posts: 10623
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Wed Feb 12, 2020 6:34 pm

Hi Kevin,
Yes, if you found what I think you did that was a tour progress indicator.

For your request, please see the attached project.
How it works:
Open the p2vr file, you will see four, point hotspots.

Open the skin:
The skin has the variable *var_count which is a number logic block.
Rectangle 1 is being used as the popup. It has a visible logic block that states that when the variable, *var_count equals 4 then visible, true.
Text 1, is just being used to show what the variable number count is and can be deleted.
The Hotspot Template does not have any actions.
The container, click pad which is a child of the template has the actions:
Source: Mouse Click
Action: Set Variable Value
Variable Name: var_count
Operation: Add(+)
Value: 1

Then when clicked will add 1 to the variable number.

The other action is:
Source: Mouse Click
Action: Visibility
Type: Hide Element
Target: _self

So what will happen is when it clicked it will add 1 to the variable and then hide, so can not be clicked again 8)
Please note the container has had permeable deselected so its an active element. It also has Hand Cursor so when it hides the mouse courser no longer shows it once the hotspot has been clicked.

The element ht_image_count, has no actions and is just there for show as teh container is transparent.


To reset I have added actions to Rectangle 1 that resets the variable to 0 and shows the container, click pad.
Regards,
Hopki
Attachments
HotspotCounter.zip
(14.43 KiB) Downloaded 37 times
Hopki
Garden Gnome Software Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
KMiddelkoop
Posts: 26
Joined: Thu May 30, 2019 1:47 pm

Thu Feb 13, 2020 8:06 am

Hello Tony and Hopki,

Thank you both for the different approaches. I'll try to implement one of the two in my project. My preferences is going to the first one because that was something I had in mind in the beginning.

Though I will look into the second one with the bar before I'll start, just to see how that is built.

Thanks again for all the efforts. When I have any question I'll let it know here.

Best,
Kevin
User avatar
Tony
Posts: 985
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Thu Feb 13, 2020 8:54 am

Hi Kevin,

I’ll post some steps and provide you the whole project and skin to work from.

Cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
KMiddelkoop
Posts: 26
Joined: Thu May 30, 2019 1:47 pm

Thu Feb 13, 2020 9:57 am

Hi Tony,

Thanks that will help. Look forward for your step-by-step.

At this moment I am working with Hopkis file. The hotspots are point hot spots. I'm trying to let polygon hotspots do exactly what the point spots are doing. Is there any chance I can let Polygon Hotspots act like the point hot spots? Where I can i.e. open an image in a pop up?


Thanks again,
Kevin
User avatar
Tony
Posts: 985
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Thu Feb 13, 2020 11:30 am

Hi Kevin,
Is there any chance I can let Polygon Hotspots act like the point hot spots? Where I can i.e. open an image in a pop up?
Check out my Polygon Hotspots & Information Popups tutorial. https://tonyredhead.com/pano2vr/polygon-hotspots-proxy

In this tutorial the polygon hotspot opens an information popup but it could just as easily be an image popup.

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
KMiddelkoop
Posts: 26
Joined: Thu May 30, 2019 1:47 pm

Thu Feb 13, 2020 12:03 pm

Super thanks. This is what I was looking for!

:mrgreen:
KMiddelkoop
Posts: 26
Joined: Thu May 30, 2019 1:47 pm

Thu Feb 13, 2020 3:59 pm

So I combined the tutorial from Tony with the var_count from Hopki. Now I am able to add +1 to the counter with the polygonic hotspots. I've created a few proxys in order to create a counter for each polygon hotspot. I need 5.

Thing I am working with now is the following:
The polygon hotspots are adding +1 to the counter. For every click on it. I can use one hotspot to hit my desired number for completing the counter.

Is there a way to deactivate the status of the proxy containers after the first mouse click? Or may be disable the polygon hotspot on a different way?
User avatar
Tony
Posts: 985
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Fri Feb 14, 2020 1:08 am

Hi,

You can add an Action to the element you are using for the Hotspot Proxy ID.


poly_disable.jpg
poly_disable.jpg (45.68 KiB) Viewed 1675 times
cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
User avatar
Hopki
Gnome
Posts: 10623
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Fri Feb 14, 2020 6:53 pm

Hi Guys,
Setting the Poly Hotspots to Disable will disable them all!

Please see the attached project.

It has polys showing by default so you know where they are.
They are using the default Hotspot ID's Poly01 and Poly02.
In the description text field is A for Poly01 and B for Poly02.

In the skin, there are three variables. There is a True/False variable for each Polygone and a numbered variable for the counter.

1.png
1.png (21.46 KiB) Viewed 1649 times

In the skin is a container with the ID: PolyHSTrigger
Under the "Hotspot Proxy ID" I am using the wild card "*" without the quotes. This will activate with ANY mouse click for ANY Hotspot be it Point or Poly.
But this does not matter as the actions detect if you are clicking a Poly Hotspot so would not be affected by any Point hotspots.

The container PolyHSTrigger has two actions per Poly Hotspot.

2.png
2.png (35.02 KiB) Viewed 1649 times

The above screenshot shows the actions for the two Poly Hotspots.

Looking at the first action for Poly01.

3.png
3.png (38.05 KiB) Viewed 1649 times

On click will add 1 to the variable "Poly_Count" but only when you are clicking poly01.
It does it by using the action filter.

4.png
4.png (33.55 KiB) Viewed 1649 times

So it will only count up by one if the variable Poly01 is false and the Hotspot description text field has "A" in it, which only Poly01 has.
As the variable Poly01 is set to false and Poly01 has an A in the description text field, the action will count up by one.
The next action for Poly01 is.

5.png
5.png (38.15 KiB) Viewed 1649 times

This sets the Poly01 Variable to true, so once clicked it can not be clicked again.
But to make it so this only changes when you click Poly01 it has an action filter.

6.png
6.png (22.58 KiB) Viewed 1649 times

So it will only change the variable to true if you click the Poly Hotspot with A in the description which is only Poly01.
To add more Poly Hotspots to the project just copy the two actions and paste a new pair for each new Poly Hotspot and add more variables.

The popup is using a visible logic block that says when the Poly_Count = 2 visible true.
This is the same for the screen tint and close button.

The close button has the actions to reset all the variable so you can try the project.

Finally, the text boxes are used to show the state of the logic block for testing and would be deleted when you have finished the project.
Regards,
Hopki
Attachments
PolyHS.zip
(18.6 KiB) Downloaded 58 times
Hopki
Garden Gnome Software Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply