Looks solid. Recapping how i think it works ( should work ) checking your images.
- sentences are split on a . - all sentences are added to formattedCxScenario - a . is added to the end. - i is checked - when (i +1) % 3 === 0 it will return true - when true a <br> is added.
Looks correct... I would add a console.log("i : "+i); to check if i is the value you need... add it just before the if and in the check...so you can see the result.
6 Replies
Looks solid. Recapping how i think it works ( should work ) checking your images.
- sentences are split on a .
- all sentences are added to formattedCxScenario
- a . is added to the end.
- i is checked
- when (i +1) % 3 === 0 it will return true
- when true a <br> is added.
Looks correct...
I would add a console.log("i : "+i);
to check if i is the value you need...
add it just before the if and in the check...so you can see the result.
Thank you, Math
I did as you requested, and it seems to be running correctly.
Do you know if Storyline supports this functionality?
you have to change "<br>" to "\n" - storyline don't use internal html breaks
Jurgen is correct ( as ususal ;-))
Thanks for the info. I tried the \n but still no break.
I'm displaying the variable in a text box, is that the optimal approach?
a have created a small example and "<br>" and "\n" is working for me
https://360.articulate.com/review/content/2227beab-6233-4a29-8ffd-07e855ffc7e7/review
upload your (reduced) .story file