I use the compass plugin and want to have various action upon the playing scene (i have four scenes in my .xml)
I try
<plugin name="compass" devices="html5"
url="plugins/compass.js"
enabled="true"
keep="true"
onavailability="copy(view.hlookat, heading);
if (get(xml.scene)=='scene_hall_130826_1218', sub(view.hlookat,60));
if (get(xml.scene)=='scene_galerienord_130826_1013', sub(view.hlookat,60));
if (get(xml.scene)=='scene_galeriezenithale_130826_1456', add(view.hlookat,180));
if (get(xml.scene)=='scene_escalier_130826_1633', sub(view.hlookat,90));
if (get(xml.scene)=='scene_jardin_130826_1127', add(view.hlookat,90));"
onchange="copy(view.hlookat, heading);
if (get(xml.scene)=='scene_hall_130826_1218', sub(view.hlookat,60));
if (get(xml.scene)=='scene_galerienord_130826_1013', sub(view.hlookat,60));
if (get(xml.scene)=='scene_galeriezenithale_130826_1456', add(view.hlookat,180));
if (get(xml.scene)=='scene_escalier_130826_1633', sub(view.hlookat,90));
if (get(xml.scene)=='scene_jardin_130826_1127', add(view.hlookat,90));"
/>
but this seems not working, and nothing is added or removed to hlookat !
Where am i wrong ?
Without testing the scene name the hlookat is incremented. I suppose my test to get the scene name is not working
Thanks for your help