Oosh said: I had a bit of a play around - I've never used R20AM so I skipped that bit and just played the tracks directly (it's only a single .set() line of code, not really worth passing through to another script unless you need other features of it). Wow, that's very useful, thank you for taking the time to work with this. I could not get R20AM to work either (EDIT - because I had master volume in settings set to 0 DUH LOL), so I deleted the code. I am having difficulty getting the .set to work though. Here's a screen shot which includes the track Alcohol. If you're familiar with South Park, it's Mr MacKay saying, "Alcohol is bad". So what I wanted to do, first, before using your code above was just to get a script to run when my Derp character moves. I based the track code below on what you had shown me and realized that my favourite page, <a href="https://roll20.zendesk.com/hc/en-us/articles/360037772793-API-Objects" rel="nofollow">https://roll20.zendesk.com/hc/en-us/articles/360037772793-API-Objects</a> , does, in fact, have a jukebox object. Hurray. on("change:token:lastmove", function(obj, prev) {
let charid = obj.get("represents");
if(charid !== null) {
let char = getObj("character", charid); //Assigns character object associated with token
let charname = char.get("name");
if (charname === "Derp") {
sendChat("Derp?", "OMG It's Derp!!!!", null, {noarchive: true});
let track = findObjs({type:'jukeboxtrack', title:"Alcohol"});
track[0].set({playing:true,softstop:false});
}
}
}); Unfortunately, I can't get the track to run. The exclamation, OMG It's Derp!, pops up just fine in the chat text, but the track.set command throws an error: TypeError: Cannot read property 'set' of undefined Any idea what I'm missing or doing wrong? Thanks in advance, -- Tim