Hi All, I'm looking to randomise the sound of a hotspot.
I have a folder call "sounds" with 12 sounds named "1.mp3", "2.mp3" ... to "12.mp3".
I try to adapt a code found here, with some changes, but it doesn't work. here is :
<krpano>
<plugin name="hasard"/>
<action name="hasard">
mul(randomvalue, random, 10);
roundval(randomvalue,0);
set(plugin[hasard].numero,
get(randomvalue));
trace('randomvalue=', randomvalue);
trace('randomvalue by get=', get(plugin[hasard].numero));
txtadd(plugin[hasard].action); call(plugin[hasard].action);
</action>
<action name="onclickspotpoint12">
playsound(soundspotpoint12, %$videos_sounds_path%/sounds/
((txtadd(plugin[hasard].action)).numero).mp3,
true, false, -121.693252, -28.525799,90, 1, spotpoint12);
</action>
</krpano>
What I was looking to do is to randomise the name of the .mp3, but maybe it's not the best way to achieve what I want to do.
Any help is very welcome. Thank you.