I am writing a easy text-based journey in lua. The intent is the person clicks on the sport.exe and it hundreds up the command immediate or no matter command shell they’ve they usually play the sport there.
An issue I am having is I usually need to show a small quantity of textual content at a time so the ui is not overflowing with chunks of phrases. So I am requiring the person to enter one thing, ideally enter, to scroll by means of to the following little bit of textual content.
print("I need you to go to the park for a bit to begin out.") io.learn() print("After a couple of minutes I will contact you, are you able to try this? (sure/no)") verify=io.learn()
I have been utilizing a clean io.learn() which can ask for person enter and permit them to kind characters and require them to hit enter, however not save what they wrote if something. The intent is for the person to not write something although and simply hit enter, and solely to write down when they’re given decisions in brackets as seen within the second half. I really feel like that is complicated and unintuitive, I used to be questioning if there was a easy higher technique. I see there are higher languages for writing textual content based mostly adventures, however I need to simply follow lua atm. If there may be recommendation from one other language, I can try to translate it over though you’d most likely have a greater thought of how. Examples are appreciated if there’s a lua resolution. Ideally I would need to forestall enter exterior of urgent enter to scroll by means of textual content, or a timer so the following little bit of textual content shows with some delay if that is doable for a easy home windows shell like command immediate.