Okay, so this will be a simple guide compared to other algorithms. It’s simple, at the cost of the ai not being quite smart…
Not wasting any more time in the intro!
How to make it: wall version.
IMPORTANT: Once you load into your map, using a player coordinate device, find the box where the player coordinates are -1, -1. You may need to play around a bit with the player coordinate device and your maze to find it. The coordinate of -1, -1 will be where the top-left corner of the maze is. The coordinate of -2, -2 should be the open square on the top-left.
If you don’t want to find this area, don’t worry, I have plan B.
For the next few steps, the instructions that are Bolded will be instructions that you only need to do if the top square is -1, -1. Otherwise, if your maze is in a position like 323, 459, you’ll have to follow all the steps. So if you’ve got your maze in -1, -1, you don’t need to follow the instructions not highlighted.
Next, you need four properties.
First: PlayerXPosition1
Second, PlayerYPosition1
Third, PlayerXposition
Fourth, PlayerYPosition
Now you need a player coordinate device.
Now you need a trigger.
In the blocks of the trigger, (red circles are must-do, others you can discard if you have -1, -1) Note, play around with the numbers at the end so that the top-left corner is 1, 1.
Now you're done with the coordinate system. From now on no more bolding and stuff!
Time to make the matrix!
First, you'll need two properties. Sentry Row:Sentry Column:
Now we need a number of properties for the number of rows of blocks. In this example, my maze is 8 tiles by 8 tiles. This means there are 8 rows and 8 columns. So I would create 8 properties, one for each row.
Now this is where it gets a bit complicated; you need to input all the tiles into the properties. For every block you can’t go through, you would put the letter “n” for no. For every tile you can go through, you would but a “y” for yes.
For the first property in this example, it is row 1 and every tile is a no.
It would be “nnnnnnnn”.
For the second property, there is just two no’s at the edges.
For the third, there is a mix.
For the fourth,
fifth,
Sixth,
Seventh,
and finally, eighth.
Now this creates a matrix, so it’s like our maze put into a series of rows and columns in text. You get the idea; for the next few rows and columns you would input more n’s and y’s and have more properties.
Continuing the setup
Now you need four properties. Above:Below:
Left:
And right.
Now you need another property, named “name”.
Copy-paste part: the code
First, you need a lifecycle.
Then, a trigger.
Then, wire the lifecycle to the trigger.
Then, grab another trigger.
In the blocks:
Now, copy this trigger, and modify the settings so it looks like this:
In the blocks, modify it so it looks like this:
Now, grab another trigger.
In the blocks:
Good! Now grab yet another trigger.
In the blocks:
Finally! You’re done with the system!
Sentries
Let’s grab a sentry and put it at 2, 2.
Using my pseudo-health for sentries guide, input these settings:
And this:
And this:
Okay! Customize the sentry difficulty and skin however you want, but when you’re done, copy the sentry to the next column. For each copied sentry, you need to change the coordinates. The coordinates are in the channels section of the settings, where it says “Activate Sentry when receiving on”. For this next sentry, the coordinates should be
The one to the right should be 42 then it goes as follows:
| Row | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| 1 | n | n | n | n | n | n | n | n |
| 2 | n | 22 | 32 | 42 | 52 | 62 | 72 | n |
| 3 | n | n | n | 43 | n | n | 73 | n |
| 4 | n | 24 | 34 | 44 | 54 | 64 | 74 | n |
| 5 | n | 25 | 35 | n | n | 65 | 75 | n |
| 6 | n | 26 | n | 46 | 56 | 66 | 76 | n |
| 7 | n | 27 | 37 | 47 | 57 | n | 77 | n |
| 8 | n | n | n | n | n | n | n | n |
And you should know how to do it for the next few rows.
In the end, we’ve got ourselves a large matrix of sentries, and a working sentry-bot chasing after you!
If you don’t want to make the algorithm yourself, here’s a gif of me testing it out:


To reduce the choppiness, reduce the time it takes for the triggers to respond (0.5 seconds to 0.01 seconds).
To increase how fast the sentries move, decrease the interval in the repeating trigger.
Have fun gimkitting!
Algorithm for without any walls.
The algorithm without any walls is a simple change, however, watch out for possible errors if the players can go in an area the sentries can’t go to. For this algorithm, you’ll need to still track the sentry position and player position, but you won’t need a matrix. Just remember that you need to put a sentry over every tile on your map, and you can’t have the player go somewhere without any sentries.
How to change this algorithm to get to without any walls:
Remove the Row# properties and remove the if blocks for the first two triggers.
Do the same for the other one!
And that should be it!
Difficulty:
- 1/10
- 2/10
- 3/10
- 4/10
- 5/10
- 6/10
- 7/10
- 8/10
- 9/10
- 10/10
- 11/10
Rating:
- 1/5
- 2/5
- 3/5
- 4/5
- 5/5









































