CAN SOMEONE HELP ME HOW TO PUT SCOREBOARD BEGGING FOR ANSWER ?

Posts

Pages: first 123 next last
My project was a bit more educational. Somewhat like "WHO WANTS TO BE A MILLIONAIRE" but its more focus on math subject. My main problem is how to set scripts in putting points in each choices.

The player will not be able to proceed to the next stage and the POINTS in each question is deducted in every wrong answer. Please let me know. :( Thanks
Marrend
Guardian of the Description Thread
21781
What you want to do with points sounds like variable manipulation to me. With RPG Maker engines, that's generally the CHANGE VARIABLE event command (or whatever). Of course, if it's not RPG Maker (You don't really specify what you're using!), then it would be something completely different.

*Edit: If it's RPG Maker, each option of a SHOW CHOICE event command can have different results. In this respect, the correct answer would add to the "points" variable, whereas the incorrect answers would subtract from that variable. Such changes would be specified via the CHANGE VARIABLE command I wrote of earlier. But, again, I don't even know for sure if you're using RPG Maker!
I'm new here, that is why I'm currently studying the language. Thank you so much for your concern. I'm using RPG VX ACE :)
So how could I manipulate the Variable?? I've seen some forum about scoreboard but I guess it went silent so the thing is I am hoping to gather what I am looking for. so let me Post some printscreen of our project here
so in the first picture you can see the questions is being ask and for the 2nd event is
I already answer the question correctly but now the problem is how can I gather the Correct answer and make it a Scoreboard so that the teacher can now see how many correct answer something like that I am hoping for a Answer to may Problem As soon as possible begging for this
Marrend
Guardian of the Description Thread
21781
If there is supposed to be a "counter" for correct answers (assumption: it's different than the "points" variable we were talking about earlier), that would also be a variable. Actually, it would be part of the SHOW CHOICE code.

Under the correct response option, the code might look something like:


# I'm just pulling a number out of my head for point value, here.
CONTROL VARIABLES [0001: points] (Add 3)
CONTROL VARIABLES [0002: correct_answers (Add 1)

An incorrect response would be something like


CONTROL VARIABLES [0001: points] (Subtract 3)


...Or, if my impressions are correct, the "points" variable might not even be necessary. It largely depends on what the "points" variable is supposed to do.

Also, if you want to tell players their grade at the end (I largely suspect this), you could do it with as much as three variables, or as few as two, depending on your comfort level. The code for the three-variable method is below.


SCRIPT:
# Yes, this means the SCRIPT event command!
# For this example, $game_variables[1] corresponds to "correct_answers", $game_variables[2] corresponds to "total_answers"
# and $game_variables[3] corresponds to "grade"
$game_variables[3] = (100 * $game_variables[1] / $game_variables[2]).floor
For the Script Below should I just Put It in on the Script Editor Its kind of confusing ? Can you Provide sir a complete instruction on how can I apply this I am totally New about this :( Let me Post some Picture how I manage to make a question to give you an Idea for this mate
Marrend
Guardian of the Description Thread
21781
You have the right idea, but not quite the execution I was thinking of! Rather than CONTROL SWITCHES, use CONTROL VARIABLES. With CONTROL VARIABLES, you would increment (that is, add 1 to) the variable that keeps track of how many questions were answered correctly, and put it into the SHOW CHOICE option that is the correct response. In this case, the first one. The other options can be blank. The variable that keeps track of total questions would be set at the offset of the test. Well, I suppose we could increment it as each question is asked, but that seems a little much at this time.

I get the impression a screen shot would really help with this, so:



Huh. I guess I threw in the "grade" operation at the end anyway.
An Error occur after I choice the correct answer so this the screen shot
I don't know where is the error after I copy your Event Contents
And Also sir I have my suggestion of this what would be the output http://oi40.tinypic.com/169nqxg.jpg
Marrend
Guardian of the Description Thread
21781
Divided by zero error!? Is it somehow not setting the "total_questions" variable to 1? That is weird!

Now, for the title screen modification, I'm mostly sure the function we want to look at is Scene_Title.create_command_window. I'd recommend taking the function into the Materials section and make the modifications to it there. You'd have to add your own "command_scoreboard" handler, though. I seriously doubt the $game_variables array can be accessed outside of a game-in-progress, so you'd have to use a different set of variables. It might prove useful to set up a class for the scoreboard, and see how that works.

I get the odd impression this scripting stuff is too complicated, and causes headaches. It does for me!
What can I do mate for this I only need Scoreboard for this :'(
Marrend:
This person is new and doesn't know anything about scripts, so it's not a good idea to use scripts in your answer. Especially when it's something that can be done easily with event commands. You can tell by one of her posts where she refers to event commands as a script. And now there is a script error and she is probably even more confused than before she started. You left her hanging with your last reply :(

I know you were trying to help, and I salute you for that, but the way you're doing it isn't going to work for a newbie. Try and match her apparent skill level. You went way over her head. She doesn't even have a full grasp of the english language and you're laying it on kinda thick with technical jargon and long confusing sentances. You need to be concise with your instructions and avoid adding extra unnecessary information. Like something in parenthesis in the middle or extra sentences at the end of possible alternatives that don't relate to the answer and serve only confuse them.

I can see why you went with extra variables for score and tracking questions asked, then turning it into a percentage at the end. That's how I would do it. She did say scoreboard. But you skipped the part where she has an understanding of the most basic solution, and went right into advanced. Also, why use a variable for questions asked? It's most likely a fixed value which can be put directly into the equation at the end. Similar issue with score. If every right answer is 3 points, you can take a copy of correct answers and simply multiple by 3 at the end. Now that I think of it, the score of each question out of 100 is basically a reverse calculation of the % out of 100. So if you figure out how many questions, you can figure out how many points each one is worth so that all correct answers equals 100. Then you can multiply correct answers by points, and you don't need to do any further calculation to arrive at a %. But whatever, there's many solutions to this.




Akiko:
If I understand correctly you simply want to display how many correct answers the player has.

Marrend was offering the correct solution. Where you were turning ON a switch, you need to ADD 1 to a variable instead. For every correct answer the variable increases by 1 and at the end that variable will contain the number of correct answers.

The easiest way to display that is to use the Text command and write in
\V[X]
X would be the number of the variable that you want to display. Make sure to use the correct slash. It needs to be \, not /.

These things are shown in Marrends last screenshot, but the reason for your error is that the last bit of code was trying to turn the number of correct answers into a percentage out of 100. It's likely missing a piece and giving an error. If you do want it to display a score out of 100, please say so and we'll work on that next.

*From what I can tell in that screen, Marrend, you have "Var2 / ..." and there is nothing after it. What are you dividing it by? Since there is nothing there, it might be dividing by 0. I don't see where you are specifying to divide var 3 by var 2, but I don't know how scripting works so maybe that is how it works.

Here's what my example code looks like



In the correct choice I add 1 to the variable and right after I put the text command. You can put the text command where ever you want depending on your need.

If you want to show the number only at the end, put the text command after the last question or create a different event to talk to at the end.

Here is what it would look like in game



Obviously you would use your math question and show choices



I picked choice 1 and now it displays my text command.

It shows a 1, because I answered the first question correctly and the variable was increased by 1. As you answer more questions correctly, the variable will grow and the text command will reflect that.
Thank you So much for This Guys So right Now I can now see how it flows...I totally Take it seriously this Project game of mine guys, Can I or can you make it randomize more likely I want it that if their are two players or more playing game together at the same time I don't wan't that they are answering the question the same there would be a part that cheating my exist so to clarify my instruction every event there will be at least 50% that It would not be the same as the other players question help me guys begging and Also Guys Is there any solution for this problem If I would like to change the question Can I change it without going to the Back End of the Game I can change it while playing and also is there any database or script for this I would like to have a accounts if there will be 2 guys playing the same game in one laptop or PC
To be clear, for multiple players they would each need to be playing the game separately. By that I mean it's not going to work to have 2 people on 1 PC.

You can easily randomize the questions, so that when 1 person plays the game they will get a different series of questions then the next person to play.

That is done with variables and conditional branches.

When you change a variable, instead of adding 1, you can make it become a random number.



Make sure the operation is SET and not ADD.

Now, what you need to do is determine what happens for each possible number that is randomly chosen in that variable. This is done with the Conditional Branch command.



There is a check box at the bottom and you want to uncheck it, as you can see I did in that image.

So now, I can put a question inside that conditional branch.



When the random number lands on 0, question 1 will be displayed. You would put in the same code as the previous example. Make sure you remember to add 1 to the correct answer variable in the proper place.

You can see in the image above that I added a second branch AFTER the first one. Not inside it. The second branch is set to the random number landing on 1. When that happens it shows questions 2.

And you would keep adding branches for every possible outcome of the random number, which is however many questions you want it to be. My random number is between 0 and 20, which is really high.

One problem with this method is that there is no way to indicate that a question has already been answered. So if the random number lands on 0 twice in a row, the player will get the same question twice in a row. Obviously we don't want that to happen.

Therefore, the easiest way to get around this is to make many NPCs with just a few questions. By NPC I mean any event that the player talks to. I see in your screenshot the player is talking to a stone thing.

Here's a simple explanation of the series of events that will unfold:

So you have a map. And there is a NPC the player will go and talk to. When they talk to that NPC, he is going to ask a question.

But before he shows you a question, a random number is chosen. The question that comes up is based on that random number using the method I explained above.

After you answer that question, you can't talk to the same NPC again to get another question. You need to talk to a different NPC for the next question.

That way, you can give each NPC a small set of possible questions. Maybe 4 or 5. And you don't need to figure out which question was already asked by that NPC, because he can only give out 1 question. And so, each player will get a different range of questions each time.

In order to make a NPC only ask 1 question you would use a switch. After the question is asked, and the answer given, you would turn ON that events Self-Switch.



This is the Self-Switch command.



Here is what the event setup should kind of look like.



Next, you create a new page on the event by clicking the New Page button at the top. You can see there is now 2 tabs labeled 1 and 2. On the left you click the box next to Self-Switch and it will have A in there. That means that this page will only be active, when Self Switch A is turned ON. Which is what happens after the player answers a question.

That's it. When the player first sees this event on the map, page 1 will be active. When they talk to it, the following will happen:

Random Number chosen
Matching branch commands are run
Question is asked
A right answer adds 1 to the correct answers variable
Self Switch A is turned on

The other branches are not run and no further commands from that event are run.

If the player tries to talk to the NPC again, page 2 is active now because Self Switch A is on. And the NPC won't ask any more questions. The player needs to seek out the next NPC that is set up the same way, but with different possible questions inside those branches.

I should mention that all of this stuff isn't called scripts. It is called event code. Scripts are something different and very complicated. It resembles complex programming code. So if you keep using the word script, people might be confused about what answer to give.

If you ever wanted to alter the questions, you would have to go into each NPC and edit the Text questions and the Show Choice answers. Everything else would remain the same.
Is It Possible to make it like I can put some question without going to the back end its I can put it on the In-game?
akikoxang, I can't really help you out much. I have been following the thread though and that last bit was sort of confusing. Did you want the computer to randomly generate the math problems?
Yeah, I can't imagine that there is a simple way to create randomly generated questions with the right answer along with a few incorrect options. If there is, it would involve scripting and you'd be in way over your head.

It's not too difficult to go into the editor and change the questions. Using my method, you would at least be able to alter things yourself. If you put enough questions into each pool, you won't need to makes changes very often.

Are you a Math teacher? And you're creating this for students? I don't think you'd have to worry too much about changing it year after year to avoid cheating. If you randomize the questions enough, I doubt the kids would post all the answers to an obscure math game for the next years kids to use.
For the random Question I am now using it but this came out as a Problem I don't Wan't the question not to be Static from time to time so in the In game Can i Put some question is Like I am the teacher and I can Add Some question Without the Presences of the Developer of the game or In short Without Going to the Back end of the Game I can Put a Question or Delete some question in the In game
author=akikoxang
For the random Question I am now using it but this came out as a Problem I don't Wan't the question not to be Static from time to time so in the In game Can i Put some question is Like I am the teacher and I can Add Some question Without the Presences of the Developer of the game or In short Without Going to the Back end of the Game I can Put a Question or Delete some question in the In game
I thought about it some more and came up with a way to do it. I will explain the process of doing it for one question, and you would have duplicate for however many questions you want. I won't be making screenshots for this one, it's very time consuming :/

You would set aside a large range of variables to be used as the numbers in the equation.

Then you would write out a message using those variables in place of static numbers.

It would look like this in the event
\v[1] + \v[2] x \v[3] =

Which, right now, would look like this in the game "0 + 0 x 0 ="

Since you can only store numbers in variables, it would be a ton of extra work to be able to set different symbols for plus or minus, or whatever. That would require a different system of using pictures and would be about 4 times as much work. So you'll have to work within a set frame of...whatever the word is for those kinds of symbols. Functions? Operations?

At the start of the game, you would set up a series of events that allow you to set the numbers in the variables. For that you use the Input Number command. It allows you to select a variable, and how many digits. So the first one would for variable 1 and probably 2 or 3 digits. The player will see a box that allows them to pick a two digit number and that is written into variable 1.

So let's say I do that and pick 15. The first equation example from above would now look like this: "15 + 0 x 0 ="

You would have to repeat this process for each number of the equation, so that the player can choose what each variable should be. Thus creating an equation. So let's say I have set variables 2 and 3, with the numbers 5 and 2. The equation would now look like this "15 + 5 x 2 = 0".

The next step is the possible answer choices. You would do the same things as the equation. Instead of writing static numbers for answers into the 4 choices, you use the \v thing. So you'd make a show choice commands and put

1
\v[4]
2
\v[5]
3
\v[6]
4
\v[7]

So now, just like with the numbers in the equation, you use the input number command to set all of these variables. One of which will be the correct answer for the equation.

And that's pretty much it. You replace all the static numbers with the /v command, and then use Input Number to set them at the start of the game. You can see how you would need many variables for multiple questions. But once you can do it once, it's just a matter of copying the entire event and replacing the variable numbers. You only need to do this once when you create the game, and everytime you load up the game it will go through a series of Input Number commands allowing you to create equations without the need for the developer.

If you do this, then you no longer need to use the previous method of setting a random number and using conditional branches. Each NPC would have 1 questions that uses a set of variables.

The start of the game will have an event, and it's only purpose to have a long list of input number commands to set the variables for the equations.

For the rest of the game, in each NPC, put a the usual message command with the equation and choices that use \v in places of static numbers.

*I hope my text descriptions are just as good as pictures*
Pages: first 123 next last