The audio plugin doesn't seem to have any way to return filenames (according to the manual page). Here's what I'm working with:
When "On 'tracks' ended" is triggered, I want to prevent the same song from playing twice in a row. Ideally I want it to call a function like so:
[quote:19xxlsd7]On "tracks" ended:
--Call function "AudioShuffle"
--Set Parameter 0 to "(name of audio track that triggered this call)"
On Function "AudioShuffle"
If Param(0) and audio are equal, call the function again.
Else, play (choose(track1,track2,etc))
Yes, you could do this in a dictionary or array as well (toggle from 0 to 1 for "chosen track" to stop it from repeating), but I would be surprised if there were not a way to do this as the events currently are. Thank you!
Then you have to be surprised, because there ain't
As workaround solution instead of your array or dictionary solutions, wouldn't it be easier just to make a list (playlist) and add all your tracks to that and use that as your input string for your audio object. That way you can always make a check vs "text at selected index" to make sure that the same track isn't played again.