How to create Hotspots with visited counter and changing state?

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

How to create Hotspots with visited counter and changing state?

Post by Goshi » Fri Feb 15, 2019 10:50 am

Hello,

basically want I want to do is the following:

Create a counter in my Skin, which is counting up, the FIRST time a ht(url, info, video, audio) is visited (In the sense of discovered that ht, so you can check later, if you discovered all of the ht in the whole tour). When the ht was visited I would like to change the appereance of it, so it is visually marked as a discovered ht.

My general plan is:
Ad a Counter-interface and a variable in the skin, which I can count up (For example on the close event of a ht_info) - This works already.
When I´m clicking it again it counts up again, thats wrong!

Question 1:
Is there a way to add a visited tag to the ht_info?
My way was, I added an invisible textfield to the ht_info in which I changed the text to visit(so it worked on each ht_info instance). The next time I´m visiting the ht_info, I want to check the text field if in it is the text "visit", if it is there, I will not count up my variable.
My problem was, I coudnt check the text field, because there is no If-Condition (maybere there is, but I dont know), so any ideas how to do it?

Idee-Question 2:
I tried another strategy

Create an own ht_button
Design-A at first visible, green Button, not visited, if it is clicked I count up my Counter-interface --> on close I make it invisible, then make Design-B visible
Design-B at first invisble, orange Button, same as Design-A but dont has the Counter-Up-order on close.
(Somehow it worked, but If I´m leaving my node and come back to it later, all of the buttons having the state of the Design-A. So the user can click it again, nevertheless the ht_button was visited before or not)
Any hint or idea for me, how to solve it?
Difficulty is that I cant it solve globally, because maybee in one node the viewer has visited two ht_buttons out of five, leaves the node and comes back later. (So there should be the two ht_buttons marked and counted as visited and the other should be in Desgin-A)

Maybee I´m thinking too much in the way of programming and not in the way the infrasturcutre of pano2vr-Skin logic works,
looking forward to your help, with best regards!

(May favorite way would be the the check text, because then I could align diferent flags to each instance of a ht_button and check it)

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: How to create Hotspots with visited counter and changing state?

Post by Goshi » Sun Feb 17, 2019 8:54 pm

Anybody a hint or any idea?
I´m really thankfor for any tips,

best regards,
Goshi

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

Re: How to create Hotspots with visited counter and changing state?

Post by Tony » Mon Feb 18, 2019 12:57 am

Goshi wrote:
Fri Feb 15, 2019 10:50 am
Create a counter in my Skin, which is counting up, the FIRST time a ht(url, info, video, audio) is visited (In the sense of discovered that ht, so you can check later, if you discovered all of the ht in the whole tour). When the ht was visited I would like to change the appereance of it, so it is visually marked as a discovered ht.
Hi Goshi,

Had a bit of a play and came up with this example. Not sure if it's the best way to do it but it does work, I'm sure Hopki could streamline it :-)

I have a tour with 2 nodes. The first node has 3 hotspots and a message. When you click on a hotspot the info opens and the corresponding counter increases by 1, at the same time the message changes to let you know how many hotspots you have viewed and the reset button appears at the bottom. After clicking on all hotspots the message changes to let you know you have seen all the hotspots.

If you go to the next node and come back the status is maintained.

Here's the example https://s3-ap-southeast-2.amazonaws.com ... index.html

Let me know if this is what you are after.

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/

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: How to create Hotspots with visited counter and changing state?

Post by Goshi » Mon Feb 18, 2019 8:48 pm

Hi Tony,

thx a lot for helping me out. From the functional side, this is exactly what I´m looking for, so much thank you. Did you do it this way?:

You store a global varialbe in the skin for each hotspot. Change the flag from 0 to 1 if it is visited and count up the counter. On the hotspot itself you put a logic block at visible. Button is visible if flag is 0 then count up, otherwise the button has the flag 1, was visited and this state will be displayed.
Reset button resets the variables in the skin.

Please correct me, if I´m wrong or I can do it in a simpler way. I also thought about doing it that way, the only concern I have that maybee it get´s messy doing it for 20 nodes with 6-8 hotspots on each of them. Any really thank you for your help!

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

Re: How to create Hotspots with visited counter and changing state?

Post by Tony » Mon Feb 18, 2019 9:48 pm

Hi,
thx a lot for helping me out. From the functional side, this is exactly what I´m looking for, so much thank you.
Glad to be able to help and that it's what you are looking for.
Did you do it this way?: You store a global variable in the skin for each hotspot. Change the flag from 0 to 1 if it is visited and count up the counter. On the hotspot itself you put a logic block at visible. Button is visible if flag is 0 then count up, otherwise the button has the flag 1, was visited and this state will be displayed. Reset button resets the variables in the skin.
Pretty much as you noted.

1. Individual Variable for each hotspot: name = my_count_1 (2,3) | type = number | init value = 0
2. Variable for the total: name = my_total_count | type = number | init value = 0
3. Mouse Click action on hotspot adds 1 to both variables
4. Action Filter on the Mouse Click action that only executes the individual variable change to if the variable = 0
5. Check mark has a logic block that sets Visible to true if the variable count is > 0
6. Reset button resets all the variables
7. Hide all the counter displays using logic block that sets visible using Tags
the only concern I have that maybe it gets messy doing it for 20 nodes with 6-8 hotspots on each of them.
Yes, it would result in a lot of variables (160) let's hope Hopki can take a look and come up with a simpler way to manage all of the variables.

I've attached the project and skin for you to take a look at.

cheers,

Tony
Attachments
Counter_Project.zip
(13.92 KiB) Downloaded 31 times
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: How to create Hotspots with visited counter and changing state?

Post by Goshi » Mon Feb 18, 2019 10:34 pm

Hi Tony,
thanks for the quick response and detailed help!

So you building also in the skin editor for each hotspot an own button, right? (to trigger the right variable in the skin editor)
This would be really messy for so much nodes and maybee is a potential point to do a lot of mistakes.

I´m scared about a design change then. Maybee changing the color or shape of the hotspot button. I have to do it manually for every button,
that would be a nightmare :)
So a better solution would be, that the buttons dont reset themself, but I have no solution for that,
maybee one of you has an idea!

Greetz Goshi

User avatar
Hopki
Gnome
Posts: 9449
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: How to create Hotspots with visited counter and changing state?

Post by Hopki » Tue Feb 19, 2019 10:53 pm

Hi,
Have a look at this project and see if you can work it out.
The key to it is variables and action filters.
Let me know how you get on.

What to expect.
The information button will show you the hotspot progress of nodes one and two.
If you click any of the hotspot in a node one, it counts up + 1, it does not matter which hotspot you click it will still count + 1.
A hotspot can only count up once, so repeat openings of the same hotspot will only count once.
When the target count is reached the text box logic block changes the text to say All hotspots found.

You can also jump between nodes and return to finish the count.
Regards,
Hopki
Attachments
ht_count.zip
(44.5 KiB) Downloaded 42 times

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: How to create Hotspots with visited counter and changing state?

Post by Goshi » Wed Feb 20, 2019 11:51 pm

Hi,

thanks a lot for the detailed help! I will check it out in detail, on the first glance I like this solution, because I can still edit all the hotspot in the skin editior at once. This is a huge benefit and a big improvement!

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: How to create Hotspots with visited counter and changing state?

Post by Goshi » Sat May 25, 2019 3:20 pm

Hi Hopki,

I figured it out and I saw that you are working with the individual description of an element. Can I use the Element´s ID instead, for me it would be better, but I didnt found a way to ask in a logic block for the element ID of an ht.

User avatar
Hopki
Gnome
Posts: 9449
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: How to create Hotspots with visited counter and changing state?

Post by Hopki » Thu May 30, 2019 9:15 pm

Hi Goshi,
Not quite sure I understand your question.
Maybe if you can tell me how you would like it to work that will help me understand?
Regards,
Hopki

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: How to create Hotspots with visited counter and changing state?

Post by Goshi » Fri May 31, 2019 11:34 am

oka sry, that´s unclear,
lets look at your example:

In the first node, you put an image ht, it´s properties:

ID: Point 03
Type: image
Skin-ID: ht_image
Title: CatNodeOne
Description: empty

in the skin on ht_image
we count up the counter, and then later save that this ht was visited. For example see image below.

To check up if this is the actual ht, we use
hotspot title: $(hs) = CatNodeOne ....

So we are asking for the ht title. But in my tour I´m using the hotspot title as Popup text and headlines. Right now I was forced to make them invisible, because it is identifing my hotspot for example n6_T01_long (node 6, T for Text, Text number 1, long for long text). This I dont want the use to see.

So my question is, in the logic block, instead of using the hotspot title as Trigger, can I asked for the ID as trigger, in your example
Trigger: ID-Element and as Value the ID: in your case Point 03?
This would be nice, because then I can use the $(hs) as popup again.

My problem is I coudnt find a trigger that is asking for the ID
Attachments
Capture.PNG
Capture.PNG (10.13 KiB) Viewed 654 times

User avatar
Hopki
Gnome
Posts: 9449
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: How to create Hotspots with visited counter and changing state?

Post by Hopki » Fri May 31, 2019 3:43 pm

Hi Goshi,
No, you can not use a Hotspot ID.
However, you can use anything that is unique to that hotspot.
So even if it is long, if the title is unique or the description is unique to that hotspots then you can still use them in the logic block.
Regards,
Hopki

Goshi
Posts: 31
Joined: Wed Feb 13, 2019 11:42 pm

Re: How to create Hotspots with visited counter and changing state?

Post by Goshi » Sat Jun 01, 2019 2:34 am

okay, thank´s a lot!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests