• 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.


    Code
    <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

    Code
    <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>
  • 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:

    Code
    <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

    Code
    onstart="layer[cbhotspots].removeAll(); add_scene_items();"


    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.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!