Find Object Game - changing the increment settings   [SOLVED] - View the solution

This sub-forum is for discussing and reporting bugs on any content that is not available by default in Panotour, so this concerns custom HTML templates, extra plugins (both Kolor-provided and third-party), etc...

Ce sous-forum a été créé pour discuter et/ou rapporter des bugs sur tout contenu qui n'est pas disponible par défaut dans Panotour, donc cela concerne les templates HTML customisés, plugins supplémentaires, etc...
no avatar
bnutton1
New member
 
Topic author
Posts: 5
Likes: 0 post
Liked in: 0 post
Joined: Mon Jan 23, 2017 3:14 pm
Info

Find Object Game - changing the increment settings

by bnutton1 » Mon Jan 23, 2017 3:19 pm

Hi Kolor Community,

I have the Find Object Game plugin installed, and I was hoping to get some advice on how I would adapt it so the increment trigger doesn't go off when nb=max, instead triggers when the nb=max hotspot is closed (rather than firing upon being opened which it does)

Any help would be greatly appreciated.

Thanks all

User avatar
bdd
Kolor Team
 
Posts: 2802
Likes: 14 posts
Liked in: 130 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

Re: Find Object Game - changing the increment settings

by bdd » Mon Jan 23, 2017 3:51 pm

I think I did not understand your question.

What I understood is that you want the hotspot to be closed before the "nb=max" action is triggered.

But it is already the case.
Here is the steps done after the last click :
1/ The spot is clicked
2/ The internal counter is incremented
3/ The spot is removed
4/ the message is updated with the new counter
5/ the custom action is called

Can you tell me more about your need, because I think I did not understand them ?

Gérald

no avatar
bnutton1
New member
 
Topic author
Posts: 5
Likes: 0 post
Liked in: 0 post
Joined: Mon Jan 23, 2017 3:14 pm
Info

Re: Find Object Game - changing the increment settings

by bnutton1 » Mon Jan 23, 2017 4:06 pm

Hi Gerald,

Thanks for taking the time to get back to me.

Currently I have 5 point hotspots - all of which when clicked display individual urls in web boxes.

When the "Find Object Game" is complete (all 5 hotspots have been clicked) I want to automatically trigger the end event - which will be to load another web box.

Problem is upon clicking the 5th Hotspot it automatically fires the end trigger of loading another web box. What I would like is for this to be triggered when the user closes the 5th hotspoint - not clicks to open.

Hope this makes a little bit more sense :s

User avatar
bdd
Kolor Team
 
Posts: 2802
Likes: 14 posts
Liked in: 130 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

Re: Find Object Game - changing the increment settings  [SOLVED]

by bdd » Mon Jan 23, 2017 4:43 pm

OK, now I understand.

You can't do it through PTP interface.
You'll have to change the generated code once the tour is built.

The plugin code can be changed a little to ease the modifications, but even with a modified plugin, you'll have to edit the xxx_skin.xml file.

1/ Edit the xxx_skin.xml file
2/ Find the action called "incrementcountergame"
Code: Select all
  <action name="incrementcountergame">
    inc(countergamenb);
    txtadd(countergameremovedelements, get(countergameremovedelements), xx, get(%1));
    updatecountergame();

    if (countergamenb == countergamemax,
     xxx your custom action called on the last spot
    );
  </action>

3/ Modify it like this :
Code: Select all
  <action name="incrementcountergame">
    inc(countergamenb);
    txtadd(countergameremovedelements, get(countergameremovedelements), xx, get(%1));
    updatecountergame();
  </action>

  <action name="nbequalsmaxaction">
    if (countergamenb == countergamemax,
     xxx your custom action called on the last spot
    );
  </action>


4/ Find the action called when the Website box displayed on a spot clicked is closed.
It's name should be something like this "closeKolorBoxCallback_websiteViewerXX" where X is a number if you have different website boxes.

5/ Add the following line at the end of the action :
Code: Select all
nbequalsmaxaction();

like this :
Code: Select all
<action name="closeKolorBoxCallback_websiteViewer">
     resumeautorotation(forceplugin);

   set(ptplugin[websiteViewer].isOpen, false);
nbequalsmaxaction();
</action>



It will do what you want, but you'll need to have a different website box plugin for the final displayed box.

Gérald

no avatar
bnutton1
New member
 
Topic author
Posts: 5
Likes: 0 post
Liked in: 0 post
Joined: Mon Jan 23, 2017 3:14 pm
Info

Re: Find Object Game - changing the increment settings

by bnutton1 » Thu Jan 26, 2017 2:41 pm

Brilliant, Thanks Gerald. Worked a treat :)


Who is online

Users browsing this forum: No registered users and 0 guests

cron