Hi, i wanted to ask i need MASSIVE help with making a question system or i guess more like a answering system, smth like this please forget the art work…
So what i have tried is to make an array (because i want tons of questions) but i also need for that question that there is giving aka the things the answers will give like +10 happy or smth, so i tried making an array in array so that it could choose a random question while also having propertys that will be given (i didnt explain that well sorry) but bassicly that didnt work so i searched and searched and searched i thought the best thing to do is make alot of arrays to hold a ton of items but i didnt want to make 500 arrays to store a million items so i tried dictionary but i just couldnt figure it out, i really need this i really dont want another project to go to the dumps, i really hate asking like this but i really cant find anything that can help, please
Here is an example on how i would atleast try to do it:
local dictionary = {
[1]= {
Question = "Do you like me?",
Answers = {{"Yes i do!",10},{"No i dont",-10}}
}
}
local function getQuestion()
local chosenQuestionArray = math.random(1,#dictionary)
local chosenQuestion = chosenQuestionArray.Question
local chosenAnswers = chosenQuestionArray.Answers
-- and so on i think you get it
end
You can use a loop in answers so that it auto creates the boxes for every answer there is with the value.
Im unsure if this is syntax correctly so lmk