how to set true/false variables via url?

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
User avatar
CStüben
Posts: 149
Joined: Mon Apr 24, 2017 6:00 pm
Location: Wuppertal, Germany
Contact:

Hi all,
i fail to set an exposed true/false variable via url. Neither does work...

?category_visible=1
?category_visible=true
?category_visible=wahr
?category_visible=t
?category_visible=w

What do i oversee?

Version is p2vr 6.1.15, osx 10.13.6


greetings from germany
Chris
---
Die Welt ist eine runde Scheibe.
deedee123
Posts: 285
Joined: Wed May 20, 2020 10:38 am
Location: NL

Hi,
isn't this what you need?
viewtopic.php?f=13&t=15454

david
User avatar
CStüben
Posts: 149
Joined: Mon Apr 24, 2017 6:00 pm
Location: Wuppertal, Germany
Contact:

Hi david,
unfortunatley this doesn´t help.

Variables of type text i can set via the url, works perfect. If one variable, or multiple, i can set them via the url.

But logical variables that contain true or false, i see no effect on the variable.

Yes, all variables are exposed.
yes, all variables have theyr code in the html that reads. the url and does a pano.setVariableValue('category_visible', gelesenerwert);

This mechanism works for text variables, but not for logical variables, and too doesnt work for numerical variables.

greetings from germany
Chris
---
Die Welt ist eine runde Scheibe.
deedee123
Posts: 285
Joined: Wed May 20, 2020 10:38 am
Location: NL

Hi,
Hmm, not entirely sure what you mean.
What i do is get the extvalue onload, with the "contains" parameter. so i can use all letters in the alphabet, and i guess numbers too, to output or change what i need. so for instance if extvalue contains "S" splash=true.
is that in the right direction?
Best,
david
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Chris,
Just checking, on the end of the URL you use #.
Looking at this post: viewtopic.php?p=64984#p64984
When you use the CustomValue.ggt you only need to add the # then the variable.

The attached project:

Screenshot 2022-09-15 at 10.14.05.png
Screenshot 2022-09-15 at 10.14.05.png (27.89 KiB) Viewed 2854 times

Note the CustomValue.ggt, this is required for both projects.

Tested with a single node as well as a tour, in the example, there is a rectangle that has colour logic blocks.
end the URL with ...index.html#Red, this will show a red rectangle.
There are also Green and Blue conditions so just replace Red with Green or Blue to see the colours.
I used Pano2VR 7 b4a for testing.

Regards,
Attachments
DNAVariable.zip
(28.47 KiB) Downloaded 96 times
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/
Post Reply