Hi all, I declare custom xml elements to manage the menu of my tours like the one below.
|
Source code
|
1
2
3
4
5
6
7
8
9
|
<scene_group name="name">
<scene name="scene_1" />
<scene name="scene_2" />
<scene name="scene_3" />
<scene name="scene_4" />
<scene name="scene_5" />
<scene name="scene_6" />
<scene name="scene_7" />
</scene_group>
|
I am able to loop through the content.
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<action name="skin_build_scene_groups">
for(set(counter,0), counter LT scene_group.count, inc(counter),
set(group_id, get(scene_group[get(counter)].name) );
set(scenes_count, get(scene_group[get(counter)].scene.count) );
for(set(scene_counter,0), scene_counter LT scene_group[get(counter)].scene.count, inc(scene_counter),
set(scene_name, get(scene_group[get(counter)].scene[get(scene_counter)].name) );
<!-- do something here-->
);
);
</action>
|
However the code above will only work before any "loadscene" calls, after loadscene it no longer works and when I try to do a check for the count its null
|
Source code
|
1
|
trace(*scene_group.count);
|
The debug code above when put before loadscene returns a number but after loadscene it returns null.
Trying to go through the docs and cant find an explanation. Can anyone enlighten me on what is happening?