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 about lastmove

1591951640

Edited 1591951685
hello, i am a little confused with "lastmove". will it automatically record from point A to point D all the coordinates {[pointAx,pointAy],[pointBx,pointBy],...,[pointDx,pointDy]} or only the last one {[pointDx,pointDy]}? i am making a trap script and i read with the other trap scripts out there that to check if a token crossed a trap you need to check all the in-between steps the token did and to do that you use the lastmove... thank you!  
1591968353
The Aaron
Roll20 Production Team
API Scripter
It will record the end points of each line segment the graphic traveled along when it was last moved, except its final destination.  For example, if you started at 1,1 and moved to 2,3, lastmove would have "1,1", left would have 2 and top would have 3.  If you moved from 1,1 to 2,3 (waypoint) and then to 7,9, last move would have "1,1,2,3", left would have 7, and top would have 9.  Here's an actual example where I first moved a token up a few squares, then moved it down, dropped a waypoint and moved it over: (the second column shows the new values, the third is the previous values)
"You talk with ridles wizard..." ,Still confused. When I move the token, and then check for the lastmove I find only 2 values (x,y). Also what is a waypoint?
1591972491
The Aaron
Roll20 Production Team
API Scripter
On a simple move of takin a token from a location and moving it to a new location, the previous Left and Top value are stored in the lastmove. Token is at 70,140  (left: 70, top: 140) Move token to 140, 270 lastmove = "70,140", left = 140, top = 270 On a complex move, where you are dropping waypoints with the right click on the mouse or pushing the Q button, the lastmove will contain the starting point and each of the waypoints along the way: Token is at 70,140 (left: 70, top: 140) Move token, dropping waypoints at 140,270 and 270,380, then placing the token at 380, 512 lastmove = "70,140,140,270,270,380", left = 380, top = 512 That's (70,140) starting point (140,270) first waypoint (270,380) second waypoint Does that help?
Yes. Now it does. I didn't know what waypoints were. We were only moving with the arrow button's...