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

1515686837
First off, very new to the community/java, so please excuse my newby-ness. I found a script for a patrolling token on here: https://app.roll20.net/forum/post/139970/script-pa... 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:  https://gist.github.com/anonymous/cb41dde6c83fa8c57b005904b2fd799a 
1515687477
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 < 0 });
1515688223
The Aaron
Pro
API Scripter
Also, it's Java SCRIPT , not Java.  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
1515740317
Thank you Kyle G, worked like a charm. Awesome community.