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

[Question]

Is there any involvement with the API and waypoints? i.e. starting state n compared to n1, n2, n3 where the waypoints are set? I'm loving this new feature, and I can see building A LOT of scripts based on the actual movement of a token, but I'm not sure how (if it's even possible) to access that path through the interface?
The Graphic object has a "lastmove" property you can access. From the Wiki: The last move of the token. It's a comma-delimited list of coordinates. For example, "300,400" would mean that the token started its last move at left=300, top=400. It's always assumed that the current top + left values of the token are the "ending point" of the last move. Waypoints are indicated by multiple sets of coordinates. For example, "300,400,350,450,400,500" would indicate that the token started at left=300, top=400, then set a waypoint at left=350, top=450, another waypoint at left=400, top=500, and then finished the move at its current top + left coordinates. <a href="https://wiki.roll20.net/API:Objects#Graphic_.28Tok" rel="nofollow">https://wiki.roll20.net/API:Objects#Graphic_.28Tok</a>...
Thanks Riley!