Date Range Trigger

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

Mon Oct 18, 2021 8:52 pm

The Date Range Trigger component changes a true/false variable to true when within the date range and back to false when out of range.

This example is used to show a winter panorama during the 21st November till the 20th March at which point it will change back to summer.

Date Range Trigger example

Change your system clock to within the above date range and refresh the browser to see the switch.

To add the component to Pano2VR, download the Date Range Trigger component.

date_range_trigger.ggskc
(2.94 KiB) Downloaded 79 times

Once downloaded double click the component to add to Pano2VR.
Pano2VR will open asking which category you should save the component to, the default is User Defined but you can define your own.

To add the component to your skin, select the category you saved the Date Range Trigger component to, then double click the component.
The date range is set using the skin configuration button.

0.png
0.png (22.67 KiB) Viewed 1006 times

To set the date range, you enter the month then day with no separators, so for example to enter the 21st December to the 20th march, you would enter:

1.png
1.png (28.48 KiB) Viewed 1006 times

This will set the variable inRange, to true during the date range, so in the above example from the 21st December to the 20th March the variable inRange will be true.


The project uses two actions in the container node_change:

2.png
2.png (45.52 KiB) Viewed 1006 times

This opens the summer panorama.
Of course the action Variable Changed will trigger anytime the variable changes, so an Action Filter is used to make sure the action is triggered when the variable is false.

3.png
3.png (39.67 KiB) Viewed 1006 times


The second action is very similar but opens the Winter panorama:

4.png
4.png (46.72 KiB) Viewed 1006 times

The action filter will only allow the action to be triggered if the variable is true:

5.png
5.png (47.63 KiB) Viewed 1006 times

The date range can be set to just one day, to do this you would enter the same date in both Range Start and Range End in the skin configuration.
The working project is also attached here:

summer_winter.zip
(2.81 MiB) Downloaded 77 times

The component can be used to trigger many things, not just changing nodes, skin colours, change text, popups and so on.
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