made it only read out string

This commit is contained in:
Yannik
2023-05-26 18:50:47 +02:00
parent 9a99b9ab03
commit ad61ec342b
2 changed files with 3 additions and 1 deletions

View File

@@ -23,9 +23,10 @@ function typeWriter() {
}
function mouseClick() {
if (document.getElementById("bubble").innerHTML.length == dlgLines[dlgPointer].toString().length) {
if (document.getElementById("bubble").innerHTML.length == dlgLines[dlgPointer].length) {
if (dlgPointer < dlgLines.length - 1) {
dlgPointer++;
while (!(typeof dlgLines[dlgPointer] === 'string')) dlgPointer++;//again if it's not string
typeindex = 0;
document.getElementById("bubble").innerHTML = "";
typeWriter();

View File

@@ -2,5 +2,6 @@
"Hello welcome to TextHorror!",
"This is the second line",
1,
2,
"Aand a third line"
]