Announcement

Collapse
No announcement yet.

Freeze Tag with Bumpers, LED's, and Modkit

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Freeze Tag with Bumpers, LED's, and Modkit

    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.

    Click image for larger version

Name:	Freeze tag.png
Views:	1
Size:	34.6 KB
ID:	1526

  • #2
    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 :-)
    Attached Files

    Comment


    • #3
      Thank you so much. It works.

      Comment


      • #4
        Cool, glad it worked.

        Comment


        • #5
          Do you have any links to resources regarding the use of variables?

          Comment


          • #6
            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.

            Comment


            • #7
              Thank you. I forgot that it was based on scratch.

              Comment


              • #8
                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?

                Comment


                • #9
                  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.
                  Attached Files

                  Comment

                  Working...
                  X