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

Need help flipping token on patrol...(newb)

First off, very new to the community/java, so please excuse my newby-ness. I found a script for a patrolling token on here: <a href="https://app.roll20.net/forum/post/139970/script-pa" rel="nofollow">https://app.roll20.net/forum/post/139970/script-pa</a>... I love the idea and discovered I could get the token to flip at the end of the patrol(fliph true). The only problem is, I can't get the token to flip back(fliph false) once the token reaches the other end of its patrol. Any help or feedback would be greatly appreciated! Here's a link to the script I modified:&nbsp; <a href="https://gist.github.com/anonymous/cb41dde6c83fa8c57b005904b2fd799a" rel="nofollow">https://gist.github.com/anonymous/cb41dde6c83fa8c57b005904b2fd799a</a>&nbsp;
I would change patroltoken.set({ fliph: true }); To // When direction is -70 this will set fliph to true // When direction is +70 this will set fliph to false patroltoken.set({ fliph: direction &lt; 0 });
1515688223
The Aaron
Pro
API Scripter
Also, it's Java SCRIPT , not Java.&nbsp; The two languages have very little in common and if you try to look for help with java, you'll be very confused when you try to write API scripts. =D
Thank you Kyle G, worked like a charm. Awesome community.&nbsp;