How to do the Sprinting thingy

I remember a guide of someone having sprinting but i forgot can someone post in community guides about it?

that would be cool, but can you use blocks to detect key presses?

1 Like

I will automatically create a guide for this topic.

Creating a Sprint Button that Uses Energy in Gimkit:

Devices required:

  1. Game Overlay x 2
  2. Repeater x 1
  3. Speed Modifier x 2
  4. Wire Repeater x 2
  5. Checker x 1
  6. Item Granter x 1

Steps:

1. Setting up the First Overlay:

  • Place a Game Overlay device. This overlay will be our ‘Sprint’ button.
  • Open the Game Overlay settings and modify the following:
    • Overlay Type: Button
    • Overlay Position: Choose as per your preference
    • Overlay Text: “Sprint”
    • Content Scope: Player
    • Visibility Scope: Player

2. Connecting the First Overlay:

  • Place a Wire Repeater next to the Game Overlay.
  • Connect a wire from the Game Overlay to the Wire Repeater, selecting “Button pressed”.
  • Then, connect a wire back from the Wire Repeater to the Game Overlay, selecting “Hide overlay”.

3. Setting up the Second Overlay:

  • Place another Game Overlay device. This one will be our ‘Stop Sprinting’ button.
  • Open its settings and modify as follows:
    • Overlay Type: Button
    • Overlay Position: Match it with the first overlay
    • Overlay Text: “Stop Sprinting”
    • Visible On Game Start: No
    • Content Scope: Player
    • Visibility Scope: Player

4. Connecting the Second Overlay:

  • Add another Wire Repeater next to the second Game Overlay.
  • Connect a wire from the second overlay to this Wire Repeater, selecting “Button pressed”.
  • Then, connect a wire back from this Wire Repeater to the second overlay, selecting “Hide overlay”.

5. Connecting the Overlays Together:

  • Connect a wire from the first overlay to the second overlay, selecting “Button pressed” to “Show overlay”.
  • Also, connect a wire from the second overlay back to the first overlay, selecting “Button pressed” to “Show overlay”.

6. Adding Speed Modifiers:

  • Place a Speed Modifier below each Game Overlay. Open their settings and set Speed to your desired value (Recommended: 1.2).
  • Connect a wire from each overlay to its corresponding Speed Modifier. Select “Button pressed” to “Set player to configured speed”.

7. Implementing the Energy Mechanism:

  • Place a Repeater on top of the first overlay. Set its “Task Interval” to “0.5” and “Stop Strategy” to “After receiving on a channel”.
  • Place a Checker on top of the second overlay. Configure its “Check #1” setting as follows:
    • Item: Energy
    • Comparison: Greater Than
    • Value: 0

8. Wiring the Energy Mechanism:

  • Connect a wire from the first overlay to the Repeater, selecting “Button pressed” to “Start repeater”.
  • Connect a wire from the second overlay to the Repeater, selecting “Button pressed” to “Stop repeater”.
  • Connect a wire from the Repeater to the Checker, selecting “Repeater runs task” to “Run check”.
  • Connect multiple wires from the Checker to manage failed checks. These wires should connect to the Repeater (“Stop repeater”), the first overlay (“Show overlay”), the second overlay (“Hide overlay”), and the second Speed Modifier (“Set player to configured speed”).
  • Finally, place an

Item Granter next to the Checker. Open its settings and set “Item To Grant” as “Energy” and “Amount To Grant” as “-1” (or any desired energy usage amount).

  • Connect a wire from the Checker to the Item Granter, selecting “Check passes” to “Grant item”.

And there you have it, your sprint button using energy is ready. Test your setup and make sure everything works as expected. Remember, when you’re out of energy, you shouldn’t be able to sprint anymore. Have fun building your Gimkit games!

2 Likes