Hi to all :)
I have made a night/day panoramic view that made an automatic switching with 2 delayedcall in 2 scenes:
--------------------------------------------------------------------------------------------------
<scene name="scene01a" onstart="action(nightday1)" >
...
</scene>
<scene name="scene01b" onstart="action(nightday1)" >
...
</scene>
<action name="nightday1">
showtext(...);
set(nightday_always,true);
delayedcall(10, if(nightday_always== true, loadscene(scene01b, null, MERGE|KEEPVIEW, BLEND(1)) ) );
</action>
<action name="nightday2">
showtext(...);
set(nightday_always,true);
delayedcall(10, if(nightday_always== true, loadscene(scene01a, null, MERGE|KEEPVIEW, BLEND(1)) ) );
</action>
-----------------------------------------------------------------------------------
In this way it work very good.
But if i want to put a button that manually put me into the other panorama, then the delayedcall is calling another time,and in the end i have 2 loop of night/day instead than 1!:
--------------------------------------------------------------------------------------------------
<scene name="scene01a" onstart="action(nightday1)" >
...
<plugin name="btn_night"
...
onclick="action(nightday1_btn);"
/>
</scene>
<scene name="scene01b" onstart="action(nightday1)" >
...
<plugin name="btn_day"
...
onclick="action(nightday2_btn);"
/>
</scene>
<action name="nightday1">
showtext(...);
set(nightday_always,true);
delayedcall(10, if(nightday_always== true, loadscene(scene01b, null, MERGE|KEEPVIEW, BLEND(1)) ) );
</action>
<action name="nightday2">
showtext(...);
set(nightday_always,true);
delayedcall(10, if(nightday_always== true, loadscene(scene01a, null, MERGE|KEEPVIEW, BLEND(1)) ) );
</action>
<action name="nightday1_btn">
set(nightday_always,false);
showtext(...);
loadscene(scene01b, null, MERGE|KEEPVIEW, BLEND(1));
</action>
<action name="nightday2_btn">
set(nightday_always,false);
showtext(...);
loadscene(scene01a, null, MERGE|KEEPVIEW, BLEND(1));
</action>
-----------------------------------------------------------------------------------
I have tryed in many way but i don't know how to have an automatical night/day panoramas loop AND ALSO stop the delayedcall on the scene,and made another one manually with a button.
Can someone help me please?...(and btw sorry for my bad english:()