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

[Help] Is there a way for a script to create a line break in an Ability's action?

1422700368

Edited 1422700524
Say i use code: createObj("ability", { name: "Longsword", description: "", action: "Attack 1: [[1d20 + 15]] Attack 2: [[1d20 + 10]]", istokenaction: true, characterid: charID }); but i want the result to appear like Attack 1: 35 Attack 2: 30 is there a way to achieve this with the script? Tried %0D%0A and also tried / (this seemed to separate them with many spaces? close but no cigar...) edit- also tried %3Cbr Cheers, Jas
1422701179

Edited 1422731566
Problem solved by a good samaritan! \n does the trick - eg. createObj("ability", { name: "Longsword", description: "", action: "Attack 1: [[1d20 + 15]]\nAttack 2: [[1d20 + 10]]", istokenaction: true, characterid: charID });
1422708102
Lithl
Pro
Sheet Author
API Scripter
I'm not sure why /n would work. The newline character is \n.
1422710286

Edited 1422711188
Brian said: I'm not sure why /n would work. The newline character is \n. that's precisely why it should work? misread that, perhaps he just typo'd
Yep. late night and too much caffeine
1422732417
The Aaron
Pro
API Scripter
Jason P. said: ... too much caffeine No Such Thing!!!! ( ...goes to get more coffee... =D )