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

[Script] Following/Marching order v2.0

1409549844

Edited 1412543095
Ada L.
Marketplace Creator
Sheet Author
API Scripter
This is a remake of my original following/marching order script, but this time less buggy, shorter, easier to use, and usable by the players to tell their tokens to follow someone else. With this script, you can tell characters to follow each other in some cardinal direction, or you can tell them to follow a character with a specified name. Usage is explained in the documentation. Enjoy! <a href="https://gist.github.com/Cazra/2378ab5a8a0ec3c208bf#v2.3" rel="nofollow">https://gist.github.com/Cazra/2378ab5a8a0ec3c208bf#v2.3</a>
1409581837
The Aaron
Roll20 Production Team
API Scripter
Interesting. I didn't know you could add properties to Roll20 objects and expect them to be persisted.
Ive been trying to get your script to work (For a Wizard and his Familiar) but its returning this error. TypeError: Cannot read property 'length' of undefined at evalmachine. :891:20 at eval ( Any thoughts?
1410931801
The Aaron
Roll20 Production Team
API Scripter
What command where you running and what was selected at the time? I'm guessing you're calling it with nothing selected and it's crashing on line 92. The script accesses selected.length there with selected being an alias for msg.selected. If nothing is selected, msg won't have a selected property and will be undefined when assigned to selected on line 90, resulting in attempting to access length from undefined at line 92.
Very interesting script to create a sort of bustling city center.
@aaron, I had the familiar selected, and I got the chat message that the token was following the wizard but nothing happened, I used !follow (name) command
1411226362
Ada L.
Marketplace Creator
Sheet Author
API Scripter
I fixed a bug in it that was causing it to crash in conjunction with the carrying tokens script. Both scripts should be fixed now.
wewt wewt! awesome job Stephen, works great! :) My Wizard player will love you! :)
1411348276
Ada L.
Marketplace Creator
Sheet Author
API Scripter
you're welcome! ^_^
1412543205
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Update: The orientation of followers will change to their leader's orientation when they are moved. This change in orientation bubbles down the line of followers with each move.