And here is the final code
â–¼ To put in your room
on enter do
textindex = 0
t1 = "test1"
t2 = "test2"
t3 = "test3"
maxtext = 3
tell event.game to
call "dialogue"
end
end
â–¼ To put in your game script
on dialogue do
if textindex<maxtext then
textindex += 1
displaytext = t{textindex}
say "{displaytext}" then
call "dialogue"
end
else
done
end
end