You are not logged in.

martyhr

Intermediate

  • "martyhr" started this thread

Posts: 333

Location: CZ

  • Send private message

1

Tuesday, June 12th 2018, 7:56pm

sorry for that "stupid" question

I want to play something only once on start of ther whole tour and thatz is why I must use variable.

In startup action I set the var1 to yes.
Second action has a condition that if var1 is yes, play the sound. If not, play another one. Just for my understanding.
But it seems my var1 is yes only when my tour starts :-(
I call action yesorno on each scene and still have only beep2 :-(

Sorry again for that question but I can nor figure it:
<action name="startup2" autorun="onstart">

set(var1,yes);
playsound(bip,beep.mp3);

</action>

<action name="yesorno" >
if(get(var1) == yes,playsound(bip,beep.mp3);,playsound(bip2,beep2.mp3););
</action>

Tuur

Sage

Posts: 3,160

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Tuesday, June 12th 2018, 8:08pm

Did you try if(var1 == yes, etcetc
Or maybe ‘yes’
?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

martyhr

Intermediate

  • "martyhr" started this thread

Posts: 333

Location: CZ

  • Send private message

3

Tuesday, June 12th 2018, 9:04pm

Tuur, my friend, if(var1 == yes ..... seems to be working
I do not why I insisted having get(var1) :-(
Thanks a lot
I knew it was my stupidity....

Tuur

Sage

Posts: 3,160

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

4

Tuesday, June 12th 2018, 9:05pm

Maybe even better is to set var1 true
Then do:
if(var1, dosomething

Btw with get(var1) you already get the value

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

martyhr

Intermediate

  • "martyhr" started this thread

Posts: 333

Location: CZ

  • Send private message

5

Tuesday, June 12th 2018, 9:18pm

Tuur, my friend, if(var1 == yes ..... seems to be working
I do not why I insisted having get(var1) :-(
Thanks a lot
I knew it was my stupidity....

...but still ....some bug.... I want to play title picture just once but the variable stays the same for two steps.
It means if first pano starts, the var1 is true and picture is shown and the var1 should be no. but if I jump to second pano and back to first, the picture is shown again. If I repead the step - jump to second pano and then to the first, picture is not shown. Seems I have to excecute the action twice to change the variable.
Oh fuc....
<action name="startup2" autorun="onstart">

set(var1,yes);
playsound(bip,beep.mp3);

</action>

<action name="showtitleonce" >
if(var1 == yes,showgallery(fotoPANO1,0);set(var1, no);,playsound(bip2,beep2.mp3););
</action>

and the first scene calls - onstart="showtitleonce();"
HERE IS THE TOUR:
http://www.virtualczech.cz/testwithtitleonce/

This post has been edited 1 times, last edit by "martyhr" (Jun 12th 2018, 9:44pm)