I’m trying to implement the idea of the game “the survey” into my own game. I’m trying to have the survey/test on a computer that a person can take and have multiple endings. I’ve been trying to get ideas on how to make this happen, but I can’t seem to find any good lead or start. So far I’ve been trying to combine the concept of having a surface GUI and having a text label on it with a click detector. But once I find a way to do that I would then find a way to scrip the next question and when it should appear. But now I’m stuck. My goal is to be able to have multiple questions that have multiple endings.
Just use a surface ui on the screen of the “computer” and place buttons and script them like they are normal buttons
You can use a setup like this for your Questions:
Every question has a seperate folder for it.
You can put an ID inside of the folders to identify the questions easier in script.
Then read this ID in the script by doing
game.StarterGui.ScreenGui.Questions.Q1:GetAttribute("ID")
You can do this in a loop for every folder in the Questions Folder.
After finding the correct Folder using a loop, you can just disable the frame to remove the buttons.
Then find the next question ID and enable the frame for that question.
Hope this helps.
P.S. Keep in mind this doesnt have to be in Screen Gui if you want to make it a Surface Gui
If you’re looking to make this as quick and painless as possible, you need to make a framework that permits you to generate these GUIs on the fly. If the graphics you’re making seems to be strikingly similar throughout each question, then you should remember the programmer and cut down repitition as much as possible. Make it easier for yourself.
ok so when i get to the
part do I put the number I put for the ID?
You can do
for _,v in game.StarterGui.Questions:GetChildren() do
if v:GetAttribute("ID") == 1 then
v.Frame.Enabled = false
end
end