Staredit Network

Staredit Network -> Concepts -> Efficient Question System
Report, edit, etc...Posted by axblader on 2005-04-18 at 20:00:04
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 Number
Mineral Chunk Type2 to: A Number
(What ever units,) to: Step number

And 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:

user posted image


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.
Report, edit, etc...Posted by Carlsagan43 on 2005-04-18 at 22:15:39
ok make the map then..
Report, edit, etc...Posted by axblader on 2005-04-18 at 22:32:03
? I am already making it...

i just wanna see if it works, cause it works for me...
Report, edit, etc...Posted by SkiLLz on 2005-04-19 at 14:29:24
Sounds kinda like a dice system I made, 12 random switches, one is set, creates 1 scrouge at location, ect. Is that kinda like what your doing?
Report, edit, etc...Posted by -BW-Map_God on 2005-04-19 at 16:23:34
Sounds like it would work though I haven't experimented with random triggers that much so maybe I misread something and it won't work.
Report, edit, etc...Posted by axblader on 2005-04-19 at 17:36:49
that'd work but then you can only have 12 total? am i correct? this one you can have 2x the more each switch, so having 100 swtiches....is like more than 2 million i think...but then the most UNefficient part of my system is the wrong part, you have to have one for each wrong thing, and it adds up...so thats why i didnt go over 5 total answers in my system.(questions dont matter, they jsut take up a lot of strings and such...).
Report, edit, etc...Posted by Red2Blue on 2005-04-19 at 18:01:51
Not very efficient.
Sounds very familiar... oh wait... its the way you are supposed to do it..


So many triggers are involved.
Then again, there is no efficient way beyond your method of asking questions...

OH wait! There is!
You could make an air unit patrol over units centering a location on it, and when the flying unit is over a particular question, you could remove that unit and ask the question and give answer options! Gee, that explaination was so much easier then yours. If you fear of map hack, you could use burrowed units, bringing 5 burrowed units to the patrolling air unit asks a different question then from 6 etc.









Your concept sounds more like rambling on about something and something...

Sounds like you are merely bragging about your system in your map.
Report, edit, etc...Posted by in_a_biskit on 2005-04-20 at 10:05:31
Red2Blue: Just because axblader decided to explicitly describe his idea and you didn't, it doesn't necessarily mean that your method is simpler or better. Concerning your own idea, I think that there's a better way to choose a random question than with a patrolling unit.
--------------------

The way I see it,
You have to have at least 1 trigger for asking every question.
You have to have at least 1 trigger for getting a question correct (which may be re-used for different questions or for all of them).
You have to have at least 1 trigger for getting a question wrong (which may be re-used for different questions or different answers or for all of them).
If you want random questions, you can probably add in some randomisation actions onto the triggeres for getting questions right or wrong.
If you want continuously showing or refreshable text, you could probably work this into the conditions or actions of the triggers for asking questions.

That's actually not too many triggers, if you know what you're doing.
Next Page (1)