I have challenged my students to develop a freeze tag game using 3 bumpers, 2 LED’s, and modkit to program it all. The two bumper switches mounted to the sides of the robot will disable the drivetrain and turn the LED’s from green to red. I would like the third bumper on the back of the robot to be able to reactivate the drivetrain. This would be useful in 2 vs 2 competitions allowing a teammate to unfreeze their partner. So far I’ve been able to get the LED’s to work and the side bumpers to disable the drivetrain using the code below but I do not know how to break the forever loops using the third bumper and reactivate the drivetrain.
Does the attached work? I have nothing to hand to test on.
I love the way the IQ forum doesn’t allow the upload of Modkit files
FreezeTag.zip (711 Bytes)
Thank you so much. It works.
Cool, glad it worked.
Do you have any links to resources regarding the use of variables?
I’m not sure that there are many resources for Modkit but there should be loads for Scratch - same principle. I don’t have any links though I’m afraid.
Thank you. I forgot that it was based on scratch.
I’m trying to only use one bumper and have the robot disabled for 10 seconds when the bumper is pressed go again. I tried adding a wait after the stop but it didn’t work. Is there a way to do that or do you have any suggestions?
@Concordiacadet try the one attached. I don’t have anything available to test it on so not sure if it works but guessing it should.
Same principle as the original one, but with one button. When it is pressed, the variable “disabled” is set to 1, waits 10 seconds then sets back to zero.
FreezeTag2.zip (667 Bytes)