
Curious why I cannot seem to move the player ribbon and only a single player. The use-case is that we play an in-person, space-base game, and my pages are resource heavy. So, my player's laptops lag really badly. I use a dummy player to show the crew pages in person on a big flatscreen, so 90% of the time that's the only player who needs to move and display the page. My laptop can handle this, where theirs cannot. Think of Captain Kirk saying 'On Screen" on a starship. That's what i have roll20 doing most of the time, and some other automations must only affect token on the currentPlayerPage. Also, the players can self-navigate through the MapChange API to pages like Engineering, SectorMap, and Cargo Bay - which are not resource-heavy. And I dont want to involuntarily move them off these pages usually. As I'm having trouble with that, I set up a script that just punts players over to a page named BlankScreen ehen the ribbon moves, as that page eats almost no resources at all. They use handouts and character sheets usually, so a blank screen is fine in 90% of our scenarios. It's less optimal than just leaving the players individual ribbons wherever they are, but it seems to be my best path forward. Can someone tell me why this script isn't working? All the players are still moved with the ribbon, and never switch back to BlankScreen. I even have a timeout to allow roll20 time to munge things in order and avoid a race condition. Vert De Ferk? on("ready", () => {
log("Isolation script loaded with working .set() method and 1500ms delay.");
});
on("change:campaign:playerpageid", () => {
setTimeout(() => {
const blankPage = findObjs({ _type: "page", name: "BlankScreen" })[0];
if (!blankPage) return;
const blankPageId = blankPage.id;
const players = findObjs({ _type: "player" });
const updatedPages = {};
players.forEach(player => {
const name = player.get("displayname");
if (name !== "Ship") {
updatedPages[player.id] = blankPageId;
}
});
Campaign.set("playerpages", updatedPages);
}, 1500);
});