I was making a Questions System for my map. So I’ll post it here:
First of all you need Random switches, each switch give you 2x the more possible questions each time. Make sure all of them are used or else you will have a blank Question and your map will get stuck…
For example, I have 5 switches, which I believe is 32 Questions.
Say I do them random then I get:
S
S
S
S
S(S = Set, C – Clear)
So I’ll make that Question 1:
But we need variables… So lets re-name some deaths to make this easier. Re-name:
Mineral Chunk Type1 to:
Q NumberMineral Chunk Type2 to:
A Number(What ever units,) to:
Step numberAnd any other variable to make sure your triggers don’t fire when you don’t want them to.
Ok then it should look like this (In SF):
Condition:Whatever they do to get a Question
Action:MoveUnit (CurrentPlayer, 1, men, (Wherever), AskAgain1);
PreserveTrigger();
IT IS IMPORTANT TO DO SO, OR ELSE THEY CANNOT SEE THE QUESTION!Condition:Whatever
Deaths (CurrentPlayer, Exactly, 0, Step Number);
Action:SetSwitch (swtich1, randomize);
SetSwitch (swtich2, randomize);
SetSwitch (swtich3, randomize);
SetSwitch (swtich4, randomize);
SetSwitch (swtich5, randomize);
SetDeaths (CurrentPlayer, setto, 1, Step Number);
Preservetrigger();
Condition:Deaths (CurrentPlayer, Exactly, 1, Step Number);
Switch (Switch 1, Set);
Switch (Switch 2, Set);
Switch (Switch 3, Set);
Switch (Switch 4, Set);
Switch (Switch 5, Set);
Ok, this will detect what Question it is on.
Action:SetDeaths(CurrentPlayer, setto, 1, Q Number);
SetDeaths(CurrentPlayer, setto, 3, A Number);
SetDeaths(CurrentPlayer, setto, 2, Step Number);
Preservetrigger();
In this case, we are setting up:
The Question number(1)The Answer Number(3)So then, now the players will have to choose the right answer:
Here’s an example from my map.
There is number
1, on the left, and number
5 on the right.
The Bottom Beacon is the
Ask Beacon. I will explain that later.
So the answer is 3, so that means they have to go to the middle one.
So then, you make a trigger:
Condition:Deaths (CurrentPlayer, Exactly, 2, Step Number);
Deaths (CurrentPlayer, Exactly, 3, A Number);
Bring(CurrentPlayer, atleast, 1, Men, Answer3);
Action:Displaytext(“Correct! +1 point!”,4);
SetScore(CurrentPlayer, Add, 1, Custom);
What ever action such as teleporting them out of the quiz place.PreserveTrigger();
You will have to set up (In this case) 20 wrong triggers, 4 wrongs for each answer.
Condition:Deaths (CurrentPlayer, Exactly, 2, Step Number);
Deaths (CurrentPlayer, Exactly, 3, A Number);
Bring(CurrentPlayer, atleast, 1, Men, Answer1);
Action:Displaytext(“InCorrect! -1 point!”,4);
SetScore(CurrentPlayer, Subtract, 1, Custom);
What ever action such as teleporting them out of the quiz place.PreserveTrigger();
Now, for showing them the Question is easy. That is the only reason why I bothered to do it this complicated, so they can re-ask the Question! Or else the text will disappear and they would be stuck!
Condition:Deaths (CurrentPlayer, Exactly, 2, Step Number);
Deaths (CurrentPlayer, Exactly, 1, Q Number);
Bring (CurrentPlayer, atleast, 1, Men, Askagain1);
This is why I put the Q Number in, so the game knows which Question you are on.
Action:MoveUnit (CurrentPlayer, 1, men, Askagain1, Return1);
Displaytext(“Question Number 1:
1+1 = x
1. x = 0
2. x = 1
3. x = 2
4. x = 3
5. x = 4
”,4);
PreserveTrigger();
Yay! You are done!
This will let you do an unlimited amount of Questions, each one up to 5 answers (Of course, you can always add more…)
You don’t have to use all the answers, even a Yes or No question would work, but it would be wrong if they went on the 3,4,5 beacons (Assuming that 1 and 2 are Yes and No)
If you are a programmer, you may realize the format I did it in is much like a Function.
You will have to customize to your own needs, this is just an example and not all the syntax is right.