Sie sind nicht angemeldet.

1

Mittwoch, 19. August 2015, 12:25

Stoplookto()

Hi !

I'm a beginner, so not sure to be at the good place to ask this, but...

On my current tour, I have a button that calls many "lookto" actions. This button allows user to see different things in the picture in a specific order.
My problem is that it's a bit too long for people who already saw it once. So I would like to completly stop all those "lookto" actions if user is doing anything with mouse, keyboard or touchscreen...

I found this "Stoplookto()" code but I don't know how to use it...

Inside my PTP xml files I have this :

Quellcode

1
<events name="autotourevents"onnewpano="autotouronnewpanoaction"onmousedown="autotouronuseraction"onkeydown="autotouronuseraction"keep="true"/>


And this :

Quellcode

1
<action name="autotouronuseraction">if (tour_autotourenabled,resetautotourvariables(););</action>


So I tried to add "stoplookto()" like this :


Quellcode

1
<action name="autotouronuseraction">stoplookto();if (tour_autotourenabled,resetautotourvariables(););</action>


This doesn't work so I think I will need your help to understand how to use it correctly...

Thank you to show me the way :-)

Cyril

herrpedro

Fortgeschrittener

Beiträge: 210

Wohnort: Lisbon

Beruf: Programmer/analyst

  • Nachricht senden

2

Mittwoch, 19. August 2015, 23:17

hi,
are you using

lookto(toH,toV,fov*,motiontype*,shortestway*,nonblocking*,donecall*)

format?

so you neet to
lookto(135 , -80 , something-you-want , null , nonblocking );
i guess

3

Donnerstag, 20. August 2015, 14:35

Thank you for your help !

This the code I'm using :

Quellcode

1
2
3
4
5
6
7
if (layer[togglebutton].state == true, mainloadscene(pano42);
wait(blend);
lookto(-134,8,90,smooth(50,10,10));
lookto(-50,26,45,smooth(50,10,10));
lookto(57,59,90,smooth(50,10,10));
lookto(17,23,30,smooth(50,10,10));
mainloadscene(pano603););

So shall I add ",null , nonblocking, ?
Like this ?

Quellcode

1
lookto(-134,8,90,smooth(50,10,10),null , nonblocking);

herrpedro

Fortgeschrittener

Beiträge: 210

Wohnort: Lisbon

Beruf: Programmer/analyst

  • Nachricht senden

4

Donnerstag, 20. August 2015, 17:44

yep, thats what stoplookto() says
only for nonblocking lookto's