Autotour Plays on Each Pano without being Prompted! How do I Stop an Action when Switching Panos?

  • I've created this autotour and I included it in my tour.xml

    <krpano>

    <!-- actions -->

    <action name="autotour0">
    set(step,1);
    set(events.onidle, autotour0() );

    oninterrupt(break);
    </action>

    <action name="autotour1">
    set(step,1);
    set(events.onidle, autotour1() );

    oninterrupt(break);
    if(step == 1, lookto(150,30,120,smooth(10,50,5)); inc(step); );
    if(step == 2, wait(1); inc(step); );
    if(step == 3, lookto(320,0,120,smooth(10,50,5)); inc(step); );
    if(step == 4, wait(1); inc(step); );
    if(step == 5, lookto(380,30,120,smooth(10,50,5)); inc(step); );
    if(step == 6, wait(1); set(step,1); );
    </action>

    <action name="autotour2">
    set(step,1);
    set(events.onidle, autotour2() );

    oninterrupt(break);
    if(step == 1, lookto(32,0,10,smooth(10,50,525)); inc(step); );
    if(step == 2, wait(1); inc(step); );
    if(step == 3, lookto(75,30,120,smooth(10,50,525)); inc(step); );
    if(step == 4, wait(1); set(step,1); );
    </action>


    </krpano>

    Then on a scene that I want, say, a pano to play tour 1, I'll add that:

    <scene name="scene_kitchen" title="Kitchen" onstart="autotour1();" thumburl="panos/kitchen.tiles/thumb.jpg" lat="" lng="" heading="">

    And it works great. But, here's a problem. When I navigate to a pano that has nothing in the onstart, it continues with the last autotour that was called. This means that if I want no movement at all I'll have to create an action that has no movement autotour0() and plug that in. I don't like doing that extra work.

    What can I add to make the autotour action cease when I change panos?

Participate now!

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