Hello!
As you may guess I am a total newbie! (I started looking into Lua 3 days ago)
Fortunatly there are tons of tutorials out there so most of the things I was able to find but there is one thing I really don´t manage to work the way i want to.
I was planning to create a game where you have to start out in an empty room and escape / explore via simple actions (“What do you want to do?” “Search the room” - for example)
So to my actual question!
How do I change the text that is displaying upon a tap event?
I´ll give you a small example how I want my event to work:
–Press the Button–
"You awake feeling dizzy … "
–press the Button–
“What do you want to do?”
–several awnsers appear–
1"Search the room"
2 “search yourself”
–press one out of them, lets say search the room–
“you search the room and find blablabla”
–press the button–
“what do you want to do”
etc etc …
I tried around with setting up a fixed number (ct=1) and played around with:
function object:tap (event)
if ct == 1 then
--insert text–
ct=ct+1
elseif ct ~= 1 then
--insert other text–
end
end
but this seems to complicated in the long run and I still can´t get the previous text to delete itself!
Sorry for the wall of text, I wanted to make sure you guys understand what I mean
Greetings, Elias
Edit: Thanks alot!
Got me some time to fully understand the table thing but I got it now hehe.