narration code not working, multiple language system

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
MisterGasman
Posts: 21
Joined: Wed Aug 07, 2013 5:28 pm

Thu Apr 03, 2014 9:32 am

Hello,
I have a problem:
I have an object-Vr...it contains hotspots....and 4 buttons with languages U can choose from (fr, eng, it and nl).
Every hotspot opens an infopanel with text and image (png), corresponding to the language that is selected (so for example: if eng is selected, an english infopanel opens).
It should be done in an easy way, without coding too much.
So i thought about using narration...

Every (polygon) hotspot is linked to a container who is hidden. The container has 4 infopanels (fr, eng, it and nl) who are also hidden.
If U click on a language button NL for example, it should hide all other language infopanels:
I tried via:
(language NL button actions)
Mouseclick->Show element->#_dutch.*
Mouseclick->Hide element->#_english.*
Mouseclick->Hide element->#_french.*
Mouseclick->Hide element->#_italian.*

or instead of show/hide element i also tried setting alpha to 0/1
Nothing works.

When i literally type the complete name of an infopanel it does work:
Mouseclick->Show element->#InfoPanel_01_dutch.*

But that would not be efficient if i have 30 containers with 30x4 infopanels.... :( Then i have to manually hide/show everything
Does these commands not work in objectVR and only pano2vr?

Thanks guys, i need to really sort this out today...
grz
User avatar
Hopki
Gnome
Posts: 11625
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Thu Apr 03, 2014 9:55 pm

Hi,
Firstly I have moved this out from the Pano2VR forum and in the skins forum.
Ok, download and then open the o2vr project file and click create all.

In the output folder but also copies in the main project folder are three folders for each language, uk, de and nl.
In each are three png files, all have the same file name, in this case just numbers, 1, 2 and 3.png

Hotspot Editor:
Each of the three hotspots has the file name in the title text box, 1.png, 2.png and 3.png.

Skin Editor:
There is a hotspot template with three hotspot images, one for each language. On start up uk, is showing with de and nl hidden.
The buttons across the bottom of the skin show and hide the corresponding hotspot image.
The hotspot template shows the popup, external loader background.

Each hotspot image has the action:
UK: mouse click, set text, test: uk/$hs
DE: mouse click, set text, test: de/$hs
NL: mouse click, set text, test: nl/$hs

So what is happening is on mouse click the hotspot image is looking for the png in the relevant folder, uk, de or nl.
The place holder $hs is taking the rest of the file path which is set in the hotspot editors title text field.

On click the uk hotspot will set the text uk/1.png which is the file path the the uk text png number 1.
Then the file path set from the de hotspot image will be: de/1.png.

Of course you can have as many different languages as you want, just add more hotspot images and png files.
Regards,
Hopki
Attachments
bilingual.zip
(332.41 KiB) Downloaded 361 times
Hopki
Garden Gnome 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/
MisterGasman
Posts: 21
Joined: Wed Aug 07, 2013 5:28 pm

Fri Apr 04, 2014 10:03 am

Hey, Great work Hopki, thanks a lot for your help.
This is a good solution, although i have polygon hotspots and i don't think i can use the system u used (with point hotspots changing icon).
Although i will try tu use your system as much as possible.

Thanks!
keep it up
MisterGasman
Posts: 21
Joined: Wed Aug 07, 2013 5:28 pm

Fri Apr 04, 2014 12:50 pm

Ok, i got everthing working.
Now the only problem i still have is how to let multiple hotspots trigger the same rectangle object in the skin?
If i add in the 'Hotspot Proxy ID' the name of one hotspot, it works.... but i want that all hotspots ID's with 'HS_IP_' activate the rectangle.
i tried adding %, $ or # but nothing work (combining)
I checked the forum but no luck...
The * works, but then it activates with every hotspot...
User avatar
Hopki
Gnome
Posts: 11625
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Fri Apr 04, 2014 5:05 pm

Hi,
The only way I can think of doing this is add a node marker, give it the action to hide or toggle visibility the rectangle.
Then copy it for very hotspot they will show that rectangle.
All you have to do is manually add the Hotspot Proxy ID for each Hotspot/Node Marker.

I am using node markers as they have no substance or file size, so if you end up adding lots it just time and will not impact on the projects file size.
I have planted a seed in the developers brain.
Regards,
Hopki
Hopki
Garden Gnome 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/
User avatar
k.ary.n
Gnome
Posts: 520
Joined: Wed Aug 15, 2007 1:02 pm

Wed Apr 30, 2014 12:30 pm

I've just played around this and just thought I'd I share what I've learned.

The only major thing that I've done differently was to upload it to WordPress using the GGPKG. I learned that the external loader will not work correctly because you can't control where exactly the files are located using the package format. You need to add your externally loading elements somewhere else...external (using an absolute URL instead of a relaitve URL).

I used multiresolution. Don't forget to make sure there's a level cached at startup. Otherwise you get a funky splitting of the tiles.

I placed the PNGs (infoboxes) to be called in the URL field of the hotspot editor instead of in the text field. This makes it easier to ID the files if you have a lot. Just use $hu instead of $hs.

You can see it in action here.
Post Reply