How to make a whack a sentry game

just a simple one or medium complex one

IDK how to do the random elements but I can lay down the basics, first have a randomizer hide and show random sentries (this would be easier with props) make them all on your team, and when a sentry appears make it activate a button that switches to a different sentry. This is just some ideas and not the entire step-by-step tutorial

1 Like

Let’s say you have ten sentries. They each will be shown on the channel ShowSentry#, where the # is the number of the sentry. They will also be hidden on the channel HideSentry#, and the number should be the same for both channels. Next, make a piece of text and connect it to a repeater, so when the repeater repeats, the code block is run. Connect the repeater to something, so when the something activates, the repeater runs it’s task. Go into the “on wire pulse“ block, and make a variable. Set the variable to “random integer between 1 and 10”. Tell the text to “broadcast on channel”. However, don’t create a channel. Get a “create text with” block, and put ShowSentry in the first box, and the variable in the second box. Finally, tell the text to set a property (it can be called anything) to the variable. Then, go out of the code, and place a property. Turn it into a number, and name it what the name of the property in the code was. Connect a wire repeater to the repeater, so every time the repeater runs it’s task, the wire repeater repeats the pulse. Change the delay in the wire repeater to any non-zero value. Then wire another piece of text to the wire repeater, so it runs it’s block when it gets a pulse. All you need in this code is “Broadcast on channel” “get property” “property”.