We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Advertisement Create a free account

Issue with calling multiple API in single macro - Roll20AM, Group Initiative

I have just started with Pro (as of today actually) and am seeing a lot of interesting things that the API system can accomplish.  I am hitting a bump though, when I tried to follow Nick O.'s videos (Nick, if you see this, they are great and keep them coming!!!). I am trying to make a simple "Fight!" macro, that clears the initiative tracker, populates it with the appropriately chosen token rolls, stops playing whatever else is playing and starts a song from my "Fight Music" playlist.  I have the following API installed at this time:  Group Initiative, TokenMod, Roll20AM and Torch. Here is the macro, which I have just labelled with a crossed sword emoji: !group-init --clear !group-init !roll20AM --audio,stop,nomenu !roll20AM --audio,nomenu,play,mode:shuffle|Fight Music It works - mostly.  It seems to not shuffle the songs selected from the Fight Music folder, rather always grabbing the one first in the list.  I tried the mode:trueRandom as well, to no effect.  It also, though not always, fails to stop playing the currently playing song.  It does the initiative part wonderfully! Hopefully, I am simply making some foolish mistake that someone will point out to me immediately. :D  Thanks in advance for any assistance you can offer.
Victor B.
Sheet Author
API Scripter
shuffle doesn't reshuffle the list until you edit the playlist and set it to shuffle.  That's a really good enhancement when I get around to Roll20AM v3. add !roll20AM --edit,mode,shuffle|Fight Music before the other calls If you want random, correct syntax is  !roll20AM --edit,mode,random,loop|Fight Music after having set the playlist to what you want, do this !roll20AM --audio,nomenu,play|Fight Music
Ah!  Thank you for the shuffle tip Victor B.!  That solves part of the problem, and I'll keep trying to figure out why Roll20AM is not stopping the already playing music.  I saw in some of the older documentation that there was a option "swap" which seems like it would do what I am seeking, but that does not seem to work in the newest (2.12) iteration.  Any thoughts?