Hi there,
I have 2 questions today:
Short story 1: How do I test if a variable is set?
Longer story 1: I'm trying to have a generic looktohotspot handling implemented to either the hostpost being clicked, or another target hotspot if one is specified. The base structure is like this:
Code
<hotspot style="test" name="hs1" ... target_scene="foobar" target_hotspot="hs2" />
<style name="test"
onclick="if(get(target_hotspot) === null,looktohotspot(get(name)),looktohotspot(get(target_hotspot))); loadscene(get(target_scene), null, MERGE, BLEND(1));"
/>
I'm not managing to set this right, with either == or === to null, or tying to use a dummy variable (e.g. if(get(target_hotspot)===get(DUMMY))). The looktohotspot to either target, and loadscene actions are working fine, I just can't get the if condition to work properly.
Question 2: if there a way to access a scene object by name rather than by index? kind of a reverse lookup: have a scene_by_name[name].index as a counterpart to scene[index].name ?
Thanks!
Tim.