There is a mode to remove/stop a Delayedcall?

  • Hi!


    I'm looking for a way to end the "delayedcall" action, but did not find it ,and reading the forum I think I understand that there are still no effective way to do it.

    I tried to use an action based on the "loadpano", "wait" and "oninterrupt", but while "wait" is running I ca't click on the scene or the loading of i'll broke the loading of the next scene...:"
    <scene name="scene1"

    ...

    onstart="action(1);" >

    ...

    </scene>


    <scene name="scene2"

    ...

    onstart="action(2);" >

    ...

    </scene>


    <action name="1">
    oninterrupt(action(stopped););
    ...

    wait(5);
    loadscene(scene2, null, MERGE,BLEND(2));

    wait(5)
    </action>
    <action name=2">
    oninterrupt(action(stopped););

    ...
    wait(5);
    loadscene(scene1, null, MERGE,BLEND(2));wait(5)
    </action>


    <action name="stopped">
    break();
    ...

    stopall();
    </action>
    "


    Is there another way in which I can load two scenes, and i can also click inside without breaking the action?

    The method by the"dalayedcall" was perfect for my purpose, but I can not find a way to stop it, if you step into another scene.


    Thanks to all for the help previously,and sorry for my english *blink*

  • Hi,

    there is no way to stop the delayedcall() directly,
    but it would be possible to use a custom variable and check for it before doing the final action,

    e.g.

    Code
    set(delayedcallkilled,false);
    delayedcall(10, if(delayedcallkilled== false, action(do_something) ) );

    to stop the delayedcall just set the variable "delayedcallkilled" to true:

    Code
    set(delayedcallkilled,true);

    best regards,
    Klaus

  • Thanks for the fast response Klaus *smile* .


    I tried as you told me, but unfortunately it seems not work ... *confused* .

    Here is an example that i have tried:
    "

    <scene name="scene1" onstart="action(donald1)>"

    ...

    <scene/>


    <scene name="scene2" onstart="action(donald2)>"

    ...

    <scene/>


    action name="donald1">
    set(delayedcallstop,false);
    delayedcall(10,if(delayedcallstop==false, action(pano2) ) );
    </action>


    action name="donald2">
    set(delayedcallstop,false);
    delayedcall(10,if(delayedcallstop==false, action(pano1) ) );
    </action>


    <action name="pano1">
    loadscene(scene1, null, MERGE,BLEND(2));
    </action>


    <action name="pano2">
    loadscene(scene2, null, MERGE,BLEND(2));
    </action>

    "

    ...but in this way don't work....


    I also tried to make a single call to action, to vary the action in various ways but it seems not work btw...
    Forgive the ignorance, could you enlighten me on this? *love*

  • Oh sorry I don't put the string for "delayedcall, true", but is not it that don't work.

    Il the delayed call that don't work, i try to explane me better:

    if i use:


    <action name="donald1">
    set(delayedcallstop,false);
    delayedcall(10, action(s2) );
    </action>


    the delayedcall run,and load after 10 seconds the panoscene2.


    But if i write:


    <action name="donald1">
    set(delayedcallstop,false);
    delayedcall(10,if(delayedcallstop==false, action(s2) ) );

    </action>


    the delayedcall don't run.

    Edited once, last by Corsifo (September 10, 2009 at 12:15 PM).

  • I was trying with the krpano 1.0.8 beta 7 version and doesn't run.
    But with your last answer, i have tried with the krpano 1.0.8 beta 8, and it work!

    Thanks a lot for your help Klaus, you're the best!

Participate now!

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