Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Help me change Waypoint Patrol API snippit to continue moving tokens even when Turn Tracker is opened

1632798709
Gold
Forum Champion
Hello. After years of using a Waypoint Patrol API script (found in the Forums, has never been in the one-click)... worked great for my AD&amp;D purposes. Now I'm employing this script in my presentation of the DUNE RPG: Adventures in the Imperium. Now I need the Waypoint script to continue moving the patrol tokens, along their patrol route, even if the Turn Tracker is open. The version of the script that I have from the author has the "Feature" of automatically pausing the patrolling when you open the Turn Tracker, and automatically resumes when you (GM) close the Turn Tracker.&nbsp; I'd like to get rid of that feature, delete or comment-out the lines of the script that do THAT. This is the Waypoint Patrol script in question (the code &amp; original author is shown): <a href="https://app.roll20.net/forum/post/2991336/script-patrols-using-waypoints/?pageforid=2991336#post-2991336" rel="nofollow">https://app.roll20.net/forum/post/2991336/script-patrols-using-waypoints/?pageforid=2991336#post-2991336</a> Thanks in advance, keithcurtis, Matt, The Aaron, Tim, Vince, and everyone who helps with API and Roll20.
1632804219
The Aaron
Roll20 Production Team
API Scripter
On the 5th to last line, remove: || Campaign().get('initiativepage') The last block should then look like: on('ready', function() { setInterval(function() { //do nothing if not enabled or initiative page is open if (!state.WaypointPatrol['PatrolStatus']) { return; } WPP.MovePatrols(); }, Math.max(WPP.RefreshRate,1) * 1000); log('Script loaded: Waypoint Patrols' + (state.WaypointPatrol['PatrolStatus'] ? ', actively patrolling' : '')); });
1632882769
Gold
Forum Champion
We're Gold. It worked perfectly. I held my breath the first time I ran it and enabled Turn Order. The animations are still moving (that would be the WORMS of DUNE continue crawling). It's a narrative game, not really turn based, and I decided to use Turn Order to continuously display Momentum stat and Threat stat, even allowing a designated player to change that "initiative" number. Thanks for your precise response. Wading into API script code became do-able with that rely from The Aaron. Wouldn't have found it without ya. TYVM.
1632888012
The Aaron
Roll20 Production Team
API Scripter
No problem!