Good evening, everyone! Today, as a part of a game, I figured out how to get teams to switch places when a button is pressed. This is a major breakthrough in not only two-player games, but almost all games in general, but the generalization to more than two teams is very tricky.
Prerequisites:
- Teams need to be on, and set to only 2 teams.
Step 1: Place down a button.
Step 2: Place down two pieces of text, and label them differently from each other.
Step 3: Wire the button to both pieces of text, so when the button is pressed, both pieces of text will run their blocks at the same time.
Step 4: Place down two properties, and label them TeamOneTurn and TeamTwoTurn.
Step 5: Go into the first piece of text, and add a bunch of even or odd block stuff.
So basically what this does is add one to the TeamOneTurn property, then checks if the resulting number is even or odd, and sends a message on a channel depending on the result.
Step 6: Repeat step 5, but with a few tiny modifications to the block code.
This is what your build should look like by now:
Step 7: Place two teleporters.
Step 8: Place two relays, one for each teleporter, that teleport Team One to their respective teleporter.
Step 9: Tell the relays to relay when they get a signal from one of the two channels that the text puts out when the button is pressed.
Step 10: Repeat steps 8 and 9, but reverse the channels that the relays will be using.
And there you have it! A system that allows for you to take turns without being able to cheese the game! This took some critical thinking, so I am pretty proud of this. If you put your mind to it, nothing is impossible in this mode. And with that, happy building!
Note: in later posts, to save time, I will call this a Turn Taker, Size #, with the # standing for how many teams will be moved.