Once more that are multiple solutions, e.g. by using a custom variable for state-checking:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
|
<action autorun="onstart">
if(intro1 != 'done',
set(intro1, 'done');
set(view, hlookat=calc(xml.view.hlookat+180), vlookat=90.0, fisheye=1.0, fov=150.0);
delayedcall(0.5,
tween(view.hlookat, get(xml.view.hlookat), 3.0, easeOutQuad);
tween(view.vlookat, get(xml.view.vlookat), 3.0, easeOutQuad);
tween(view.fov, get(xml.view.fov), 3.0, easeOutQuad);
tween(view.fisheye, 0.0, 3.0, easeOutQuad);
);
);
</action>
|
Or here another solution - just give the <action> in each scene an individual name:
|
Source code
|
1
|
<action name="intro1" autorun="onstart">
|
An 'autorun=onstart' action will be only executed once and when it has a given name, that state is tracked automatically. Without given name, an automatic name will be used and this name will be different each time, so also the action gets executed each time.