Why is wait not working.

  • I am doing this

    wait(3);lookto(0,-10,50,smooth(20,20,20));wait(3);lookto(-120,0,95,smooth(20,20,20));wait(6);action(popup1s);wait(7);action(popup1c);

    The first wait works,
    the next also works,
    but then the wait(6) before popup1s actually starts at the start of the previous movement and then the wait between opening and closing the popup does not work.
    It just popup and closes within a second.
    '
    I also need a nice fade in fade out on the popups.


    Hans

  • Maybe try calling your actions like this instead??? Also, I have had issues previously when I did not leave a space after each ;


    wait(3); lookto(120,0,95,smooth(20,20,20); wait(6); popup1s(); wait(7); popup1c();


    Jarred

  • Sorry , not working

    I can get it to popup to any alpha level or just with visible true but I can not get any fade in from alpha 0 to alpha 1

    And I can not get any wait time before it closes.

    I have to say after doing doing hundreds of similar actions in another viewer I can not understand that this is so hard in KRPano.

    Hans

  • I got it working partly by cheating it with a double lookto action with very slow movement.

    BTW I have no idea what this timings mean, They are the most stupid definitions I ever seen.

    What is it it supposed to refer to. Why is 20,20, 20 the same as 7 sec. And why is 1,1,1 also around 7sec in another movement.

    But I can still not get the fadein out in my popup action.


    <action name="pan1">
    oninterrupt(break);
    wait(3);lookto(0,-10,50,smooth(20,20,20)); wait(3); lookto(-120,0,95, smooth(20,20,20)); wait(6); popup1s(); wait(10); lookto(-120,0,110, smooth(1,1,1)); popup1c(); set(autorotate.enabled,true);
    </action>

    Hans

  • Hans,

    I threw together a sample and it seems to work.


    <plugin name="text1"
    url="plugins/850.png" keep="true"
    scale="1"
    alpha="1"
    align="center" x="0" y="0"
    width="150"
    height="150"

    onclick="wait(3); lookto(0,-10,50,smooth(20,20,20)); wait(3);
    lookto(-120,0,95,smooth(20,20,20)); wait(6);
    popup1s(); wait(10); action(popup1c);" />


    <action name="popup1s">
    tween(plugin[text1].alpha,0,3);
    </action>

    <action name="popup1c">
    lookto(30,0,95,smooth(20,20,20));
    wait(); tween(plugin[text1].alpha,1,6);
    </action>


    Jarred

  • BTW I have no idea what this timings mean, They are the most stupid definitions I ever seen.

    What is it it supposed to refer to. Why is 20,20, 20 the same as 7 sec. And why is 1,1,1 also around 7sec in another movement.

    Hans

    ◦smooth(accel,break,maxspeed) - accelerated smooth movement (=default)
    ■accel = acceleration in degrees/second² (default=720)
    ■break = negative acceleration in degrees/second² (default=-720)
    ■maxspeed = maximum moving speed in degrees/second (default=720)

    you dont have to use those settings i usually use the simpler one. there is something wierd about chaining waits and the order they are executed. i cant find the post Klaus used to explain it to us.

    lookto(33,-22,30,linear(10));

    the last number is the degrees/second you want to rotate.

  • i remember why i think. the way you have it coded in your first post. the whole action gets read and all the waits start at the same time. unless you tell it to wait until that part of the action is complete then start the next counter.

    wait(3);
    lookto(0,-10,50,smooth(20,20,20));
    wait(3);
    lookto(-120,0,95,smooth(20,20,20));
    wait(6);
    action(popup1s);
    wait(7);
    action(popup1c);
    </action>

    should be like this.

    <action name="pan1">
    oninterrupt(break);
    wait(3);
    lookto(0,-10,50,smooth(20,20,20) WAIT);
    wait(3);
    lookto(-120,0,95,smooth(20,20,20) WAIT);
    wait(6);
    action(popup1s);
    delayedcall(7, action(popup1c));
    </action>

    WAIT stops all user interaction until the time is up.
    DELAYEDCALL executes the action but allows user interaction the oninterrupt(break); may cancel the delaycall though.

  • Hi,

    Maybe try calling your actions like this instead??? Also, I have had issues previously when I did not leave a space after each ;

    whitespaces like spaces, tabs or line breaks between actions are ignored,


    BTW I have no idea what this timings mean, They are the most stupid definitions I ever seen.

    it defines the acceleration, breaking and maximum moving speed for the movement,
    this makes the movement independent of distance and time - e.g. if the distance is short, then the moving time will be also automatically short and if the distance is long, it will be automatically long,


    WAIT stops all user interaction until the time is up.

    sorry, but the WAIT is only for the tween() action,
    see here at "donecall":
    https://krpano.com/docu/actions/#tween

    the lookto/looktohotspot/moveto/zoomto and wait actions are always blocking,

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!