Hello, how do I get a list of hotspots in the scene? I want to have them all in a combobox menu.
Thanks!
Hello, how do I get a list of hotspots in the scene? I want to have them all in a combobox menu.
Thanks!
Thanks, I'm trying to put it in a combobox using the examples and what you provided, but it doesn't seem to be working.
<combobox name="hotspots" design="vtour" align="leftbottom" x="10" y="10" onloaded="add_scene_items();" />
<action name="add_scene_items" scope="local">
for(set(i,0), i LE hotspot.count, inc(i),
caller.additem(calc(hs, hotspot[get(i)].name + ', '); txtadd(list, get(hs)), calc('loadHotspot('+i+')') );
</action>
this list will show all the hotspots, so you need to create a condition where you specify the hotspots to display
<combobox name="cbhotspots" design="vtour" align="leftbottom" x="10" y="10" onloaded="add_scene_items();" />
<action name="add_scene_items" scope="local">
for(set(i,0), i LT hotspot.count, inc(i),
caller.additem(get(hotspot[get(i)].name) , calc('looktohotspot('+hotspot[get(i)].name+',45, smooth(100,50,20)') ));
);
</action>
Hi thanks for your response. I tried your code, but it only shows these 4 spots no matter what scene I'm in.
Yes, you got a list of all the hotspots that are in the current scene
If you have local hotspot in other scenes, they will not be displayed, because they are created only if the scene is active
Install this code, added a condition - if the hotspot is visible. then add to the list:
<action name="add_scene_items" scope="local">
for(set(i,0), i LT hotspot.count, inc(i),
if(hotspot[get(i)].visible,
layer[cbhotspots].additem(get(hotspot[get(i)].name) , calc('looktohotspot('+hotspot[get(i)].name+',45, smooth(100,50,20)') ));
);
);
</action>
In the "onstart" of the scenes, enter
When switching scenes, the list will be updated.
Create your own conditions for the list.
Thank you so much! There's one last question I have:
Is it possible to open the hotspot instead of zooming in on it? I tried replacing looktohotspot with loadhotspot to open the hotspot but it's not working.
you need to use callwith
for example:
That worked, thank you so much!!
Don’t have an account yet? Register yourself now and be a part of our community!