Basic Action with If ---?

  • Hi Guys,

    Im looking for a basic conclusion to my little dilemma - I don't have time to work it out! :(

    <action name="s2">
    looktohotspot(s2, 10, smooth(100,50,50));loadscene(scene2, null,MERGE,BLEND(1));lookat(38.45,80.01,100.34);wait(blend);lookto(0,0,100,smooth(100,100,100));)
    </action>

    I would like - "if the hotspot is in the panorama - look lo hotspot and then do all the above" looktohotspot(s2, 10, smooth(100,50,50));loadscene(scene2,
    null,MERGE,BLEND(1));lookat(38.45,80.01,100.34);wait(blend);lookto(0,0,100,smooth(100,100,100));)

    BUT - "if there isn`t a hotspot there - then just loadscene(scene2,
    null,MERGE,BLEND(1));lookat(38.45,80.01,100.34);wait(blend);lookto(0,0,100,smooth(100,100,100));)

    Without errors...??

    Thankx all

    PS - This bit works when there is a hotspot - but nothing when there is nothing (obviously) -

    Zitat

    <action name="s1">
    if(hotspot[s1].loaded, looktohotspot(s1, 10, smooth(100,50,50));loadscene(scene1, null,MERGE,BLEND(1));lookat(38.45,80.01,100.34);wait(blend);lookto(0,0,100,smooth(100,100,100));)
    </action>

  • With if there should be also an else..

    try


    <action name="s1">
    if(hotspot[s1].loaded, looktohotspot(s1, 10, smooth(100,50,50));loadscene(scene1, null,MERGE,BLEND(1));lookat(38.45,80.01,100.34);wait(blend);lookto(0,0,100,smooth(100,100,100))
    , loadscene(scene2,
    null,MERGE,BLEND(1));lookat(38.45,80.01,100.34);wait(blend);lookto(0,0,100,smooth(100,100,100));)

    </action>

    the , does the else...

    i'm not shure at all but maybe just try ..

    This works for me:

    <action name="moveto500">


    set(menuu,get(plugin[menuclose].visible));
    if(menuu == false, set(plugin[menuopen2].visible,true);set(plugin[menuopen].visible,false);tween(plugin[mask_Lkopie].alpha,0,0.2,smooth(70,70,70));tween(plugin[mask_Rkopie].alpha,0,0.2,smooth(70,70,70));tween(plugin[mask_Tkopie].alpha,0,0.2,smooth(70,70,70));tween(plugin[mask_Bkopie].alpha,0,0.2,smooth(70,70,70));tween(plugin[mask_LTkopie].alpha,0,0.2,smooth(70,70,70));tween(plugin[mask_RTkopie].alpha,0,0.2,smooth(70,70,70));tween(plugin[mask_LBkopie].alpha,0,0.2,smooth(70,70,70));tween(plugin[mask_RBkopie].alpha,0,0.2,smooth(70,70,70));, set(plugin[menuclose].visible,false);set(plugin[menuclose2].visible,true);tween(plugin[mask_L].alpha,0,0.2,smooth(70,70,70));set(plugin[mask_Lkopie].visible,true);tween(plugin[mask_Lkopie].alpha,1,0.2,smooth(70,70,70));set(plugin[mask_Rkopie].visible,true);tween(plugin[mask_Rkopie].alpha,1,0.2,smooth(70,70,70));tween(plugin[mask_R].alpha,0,0.2,smooth(70,70,70));set(plugin[mask_Tkopie].visible,true);tween(plugin[mask_Tkopie].alpha,1,0.2,smooth(70,70,70));tween(plugin[mask_T].alpha,0,0.2,smooth(70,70,70));set(plugin[mask_Bkopie].visible,true);tween(plugin[mask_Bkopie].alpha,1,0.2,smooth(70,70,70));tween(plugin[mask_B].alpha,0,0.2,smooth(70,70,70));set(plugin[mask_LTkopie].visible,true);tween(plugin[mask_LTkopie].alpha,1,0.2,smooth(70,70,70));tween(plugin[mask_LT].alpha,0,0.2,smooth(70,70,70));set(plugin[mask_RTkopie].visible,true);tween(plugin[mask_RTkopie].alpha,1,0.2,smooth(70,70,70));tween(plugin[mask_RT].alpha,0,0.2,smooth(70,70,70));set(plugin[mask_LBkopie].visible,true);tween(plugin[mask_LBkopie].alpha,1,0.2,smooth(70,70,70));tween(plugin[mask_LB].alpha,0,0.2,smooth(70,70,70));set(plugin[mask_RBkopie].visible,true);tween(plugin[mask_RBkopie].alpha,1,0.2,smooth(70,70,70));tween(plugin[mask_RB].alpha,0,0.2,smooth(70,70,70)););




    set(plugin[menuclose3].visible,false);



    set(plugin[lvvlogo].visible,true);


    set(plugin[mapcloselogo].visible,false);
    tween(plugin[mapcloselogo].x,250);
    action(closemap);

    set(plugin[mapslogo].visible,false);
    tween(plugin[mapslogo].x,250);






    action(startloading);

    action(load5);
    lookat(200,-4,20,smooth(60,60,60));
    wait(blend);
    oninterrupt(action(lookinterrupt));
    lookto(90,5,60,smooth(60,60,60));
    action(loadingdone);

    action(showtextfield2, historie6);
    set(plugin[historie6].visible,true);
    wait(13)
    oninterrupt(action(lookinterrupt));




    </action>


    in the fift line you see an , that is the else.. i made it red.. it's not so clear i'm sorry but i hope it helps

    have fun

    Cheers

    Tuur *thumbsup*

Jetzt mitmachen!

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