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 .
×

[Help] Hello again friends! I am in need of some advice for a script I am looking to make!

I am currently running the DnD 5e module Curse of Strahd, and time/travel is seeming important in this campaign. I am looking to build a 2D array variable with the numbers being tied to the locations, and then having the times be stored in the array spot. Example: [0] => [5] = 2.7 hours. My questions are: How do I create a 2D array in javascript (I know how to do it in other languages).                               How would you recommend I fill in the times? Thanks in advance!
1548043127
The Aaron
Roll20 Production Team
API Scripter
In JavaScript, a 2d array is just an array of arrays. You’d create an array and iterate through it, setting each location to another array as you go.