I'm having a little issue here.
My situation is the following:
- I have sounds named:
- Animal3 etc..
Once going to a layout it has pick one of the sounds listed above.
There is a button you can click to play that sound.
Once the sound is over it has to be saved in a Webstorage so we know that the sound is played before. As far as my concern i think i would have to save it as:
Webstorage > Set local value "Animal1" = 1.
So it should:
Start of layout > Select sound ( between animal1, animal2, animal3 ) where Webstorage "animal1/animal2/animal3" = 0
"for this example sound 2 ( animal2 ) is selected"
Click on button > Selected sound will play
On sound ended > Set webstorage "animal2" = 1
So the next time it should be:
Start of layout > Select sound ( between animal1, animal3 ) where Webstorage "animal1/animal3" = 0
"as you see sound 2 is done and will never be selected again"
The point that i can't fix is selecting the sound on random order, but only if the webstorage for that sound is "0".
Any help in the right direction would be lovely!
Thanks in advance!