You know those games from the arcade where you whack moles that pop out of holes? This guide will teach you how to recreate in Gimkit.
Making the pop-up randomizer
Place a lifecycle that listens for game start, place a repeater which has a task interval of how frequently you want your “Moles” to pop-up from their holes. Set the stop strategy to after receiving on channel and do not input a channel. Place a trigger that is invisible and has no collision on game start. Create the following block code for the trigger:
Making a Plant (Mole)
Place a Sentry in which its appearance is a Green Evil Plant, set it to be inactive on game start and activate when receiving on “ActivatePlant1”. Be sure to place the Plant in a dark scrape area.
Whacking The Plant
Place a button on top of The Evil Plant that is invisible, inactive on game start, and activates when receiving on “ActivatePlant1”, set the button to transmit on “WhackPlant”. Set the button message to “Whack Plant”. Wire the button to the Plant (Button pressed - Deactivate sentry) Place a wire repeater, then wire the button to the wire repeater (Button pressed - Repeat the wire pulse) then the wire repeater back to the button (When the wire receives the pulse - Deactivate button). And with that, our first plant is complete!
To make more plants, simply copy and paste the devices, rewire them, and modify the channels for the button and sentry depending on its Number (Plant 2 would have the sentry and button activate on “ActivateSentry2”, Plant 3 would have the sentry and button activate on “ActivateSentry3”, and so on. Be sure to place each plant in the dark scrapes)
Getting Score
Place a player-scoped counter that increments when receiving on “WhackPlant”, set it to update a property named “PlantsWhacked”. In the map options, set the score type to property and set it to track “PlantsWhacked”. (Make sure the property is scoped to player)
Ending the Game
Set the map options Game Clock to countdown and set it to a short amount of time (Like 3 minutes)
Death Penalty (Optional)
Place a lifecycle that listens for “Player Knocked Out”. Place a trigger which is invisble and has no collision. Make block code for the trigger that decrements the score property by any amount. (Depending on how gruesome you want your death penalty to be.) Now, wire the lifecycle to the trigger (You know how to wire it.)
I think we are done.
- 0/10
- 1/10
- 2/10
- 3/10
- 4/10
- 5/10
- 6/10
- 7/10
- 8/10
- 9/10
- 10/10
- 11/10