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

Slowing down a tokens automated move on dropping the token.

I'm brand new to API... sorry "Mod" use, and have zero background in Java or coding of any sort. My intention is to learn bit by bit as I go and just start out by working out how to adapt existing API stuff to fit my needs. However... Something came up that i would love to do in a hurry...  Next session my players will be entering a Barrow... and of course it would be unforgivable of me to NOT put at least one Barrow Wight down there. As this a 2E AD&D campaign and they are only level 3, this should give them cause to worry. They don't know that I have upgraded to Pro and I had an idea for the Wight's entrance. I want to have it slowly creep down the tunnel toward them while I describe it... I don't want it to shuffle... but glide. So, getting to the point... is there a way to slow down the speed at which a token moves from the viewers PoV when you as the GM pick it up and move it? And if so, where can I find it... and a hint as to how to use it would be fabulous! Many thanks in advance.
1664459582
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Tommy! This might be worth experimenting with: You can do it without a mod by holding down alt and using your cursor keys. this will cause it to move pixel by pixel instead of grid by grid.
1664461598
The Aaron
Roll20 Production Team
API Scripter
Mod scripts can definitely let you move the token in smaller increments, but it doesn't have access to the rate at which it gets moved between those increments.&nbsp; It will always be somewhat stutter stepping, it's just a question of how much and how often.&nbsp; If I were doing this, I'd probably write a script that would move the token along a path object and try varying how far it moves each time, and how often it moves, and see what feels right.&nbsp; You could also have the position deviate from the line perpendicularly by some opposing amount each time so that it seems more intentional (kind of Balrog stopping... =D). Here's some links on programming Mod scripts (Incidentally, it's Javascript, not Java—those languages are vastly different): <a href="https://app.roll20.net/forum/post/6237754/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/6237754/slug%7D</a> <a href="https://app.roll20.net/forum/post/6584105/creating-an-object-that-holds-specific-character-dot-id-and-character-name/?pagenum=1" rel="nofollow">https://app.roll20.net/forum/post/6584105/creating-an-object-that-holds-specific-character-dot-id-and-character-name/?pagenum=1</a> <a href="https://app.roll20.net/forum/post/6605115/namespaces-novice-seeks-help-exploring-the-revealing-module-pattern" rel="nofollow">https://app.roll20.net/forum/post/6605115/namespaces-novice-seeks-help-exploring-the-revealing-module-pattern</a>
Thanks guys. Keith, I remember when I learned the hard way that moving a token slowly with the mouse wasn't appearing that way to my players when I believed I had a gelatinous cube slowly stalking them and it was only when I let it go that one of the players actually let out a yelp!&nbsp; Aaron, that was actually the result of me originally typing "Javascript" then thinking, "Oh... am I supposed to make the "s" a capital "S"... deleting the "script" bit then forgetting to check before I posted... oops. I've been trying to get my head round the basics and I finally begin to believe that I might have a chance.&nbsp;&nbsp; I'll check into those links this evening. The more I can read the better. I know I will never bee able to create the codes you guys can (my brain is far too old and full of rubbish to learn anything that complex...), but as long as I can eventually understand how to use those available and tinker my way through to amend them to my needs I'll be happy.
1664466498
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Tommy said: Thanks guys. Keith, I remember when I learned the hard way that moving a token slowly with the mouse wasn't appearing that way to my players when I believed I had a gelatinous cube slowly stalking them and it was only when I let it go that one of the players actually let out a yelp!&nbsp; Yeah, I wasn't sure about that one, and wasn't in a place where I could test with a dummy account. Thanks!
1664466681
timmaugh
Pro
API Scripter
Yeah... to do the idea of pixel-creeping tokens, you have to let it go for each "increment"... move it a few pixels, let it go... move it a few pixels, let it go... move it a few pixels AND CONTINUE TO TALK OVER THAT PLAYER THAT IS NOW BEGINNING TO NOTICE THE CREEPING THING STALKING THEM AND WANTS TO WARN THE PARTY, let it go... move it a few pixels, ANNOUNCE THAT THE PLAYER WHO HAS NOTICED IS PROBABLY JUST HAVING AN EPISODE, let it go... =D And post back as you start coding! Coding on Roll20 -- within the bounds of what you can/can't do in the VTT -- can be as challenging as learning the language, but there are a lot of folks willing to help!
Thanks again guys. this is one project/hobby where I'm going to try and ask for help when I need it, and overcome my very British sense of... a) ...not wanting to bother people who probably have better things to be doing with their time than dealing with my nonsense... and&nbsp; b) ...feeling embarrassed about looking stupid by asking "dumb" questions. Cheers.
1664479489
The Aaron
Roll20 Production Team
API Scripter
Yeah, definitely ask for help, post code samples, etc.&nbsp; Contrary to a), we actually really enjoy the feeling of being helpful, and that gives us the opportunity.&nbsp; =D