0 votes
by (140 points)
HTML 5 supports progress bars, which I think would make my game a lot more enjoyable.

While:

<progress value="55" max="100"></progress>

works fine,

(set: $score = 55)
<progress value="$score" max="100"></progress>

does not.

Any idea what I can do?
Thanks!

1 Answer

+1 vote
by (159k points)

You will need to use the (print:) macro to dynamically create the progress element from a compound String value.

(set: $score to 55)
(print: '<progress value="' + (text: $score) + '" max="100"></progress>')

 

...