Changing Colors + Math Solver

I’m creating a mini game that requires students to solve a basic math problem.

Each math problem is linked to a square that changes colors based on their answer. For example the colors are red = 20, blue = 10, and green = 15. The problem they have to solve is 5+5. So, once they answer it, the square turns blue.

I’m not very good at figuring out the code blocks on my own, but I can figure it out with assistance. I need a way to…

  1. Input a number to answer each question (there’s a lot, so using a counter with a button might not work for memory or space).
  2. Link that answer to the square so it changes to the correct color when answered.

(The colors would be layered on top of each other, I just need a way to activate the change based on the answer the player has)!

I’m fine if they can’t input a number. Each color is linked to a specific number, so all I need to do is find a way for the colors to change.

I wish I could explain in more detail, but I don’t want to give away my idea just yet, because I’m trying to make a guide on the game and don’t want the idea stolen.

Use a player-scoped counter and two buttons, the buttons increment and decrement the counter and have the counter value attach to a player-scoped property, you can use checkers to output signals in which turns the answers to the respective color.

OR

You can have them step on the answers using triggers and wires.

1 Like

Is there a simpler way using blocks? If I did the counter with buttons it would take up a TON of memory.

I guess you could use pop-ups with different numbers that the player can cycle through to find the right answer and when they click it it activates different triggers depending on the number they chose, the triggers then updates a property and a checker checks. I don’t know if it uses less energy, but I think it should. Depending on the amount of pop-ups and answers you have.

1 Like

Thank you.

I have an idea too, but I’m not sure how to make it work.

Is there a way to sync just one button to multiple text blocks and have it change to each one per click? So If I click a button once it changes, but I click it again, it changes to a different text box?

1 Like

Well I guess you can connect the button to each text box but only have 1 active at a time, so maybe if you could deactivate the 1st text and activate the second, but with more than 2 text boxes I don’t think it is possible, well maybe with like a property and counter you might be able to find a way… I don’t know, I would have to test it out in gimkit, and that I can’t do.

1 Like

Thank you for trying to help. As I was setting up everything… I just I can’t do it all anyway for my current map. (Maximum limit on textboxes).

1 Like

Oh, yeah, no problem. I mean if the text box is used for numbers you might be able to use a counter.

You should use a counter. You can use counter operations to change the number you change the input by. Use this guide. It’s technically for copying counters, but it also works for adding counter values.

Thanks for being so specific!

Also, I noticed that you wanted a way using blocks for memory purposes, but I’m pretty sure that blocks would be more inefficient in this scenario. (Blocks are 500 memory a piece, or .5% of your map).

1 Like

Alright. Thank you! I wish I could share more details into what I’m trying to create, but it’s one idea I haven’t found yet in the forums and I don’t want anyone to beat me to it.

Cant you just use a questioner with a custom kit. Then when a question is answered correctly, broadcast on a channel. The channel changes the square color or something.

1 Like

But it won’t detect which answer was chosen if it was wrong.

Oh. I understand what she meant now…
Then yeah counters would work

it seems like you want to have something close to a questioner device…
may I ask why you cannot just use the questioner device?

Because the answer chosen needs to be detected

1 Like

I ended up starting with a trigger, pop up and 2 different color barriers. Then adding a wire repeater so I could deactivate the other barrier if the other color is selected. Then I set the popup to have two call to actions and each one activates one of the barriers. I’ll be adding an item granter to the correct choices to let them advance to the next level once they have enough of that item.

It’s a lot more memory than I want it to be, but I’m not as advanced at using the channels and couldn’t get it to work that way.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.