Have you ever played a game, and the sentries are too hard or too easy to beat? Well, look no further. This system will help you make AI’s that progressively get more difficult, and to ease them down if they get too hard to handle. Now-
Let’s get started!
I’m supposed to say that!
Who cares? You snooze you lose.
Then let’s see if your fast enough from me clicking your mute button.
What! I can’t even walk, I’m just a disembodied voi-
That’s much better. Anyways, let’s get right to it.
Breaking It Down
Now, how exactly does this work? Well, we can simplify this.
- Ascension: The AI gets more difficult the more times you knock it out
- Superiority: Eventually, the AI has reached maximum difficulty, and cannot advance any further. (This is because we have settings that finite their capabilities) And has become to hard to beat.
- Descension: The AI eventually decreases in difficulty and becomes more easy.
And the cycle repeats over and over again.
Making the System
The first step for this is to get our sentries. Fairly simple as I just used 4, but you can add more or less. Configuring each sentry to be more difficult than the last. Have the easiest sentry activate on game start, the others will be activated further into the game. After that’s done, we are going to add broadcasts.
Sentry Broadcasts
Level 0 sentry (first sentry you come across):
- Activate Sentry when receiving on: (nothing here, it is already active)
- Deactivate Sentry when receiving on: easyLevelSentryActivate/Deactivate
Level 1 sentry (easy):
- Activate Sentry when receiving on: easyLevelSentry
- Deactivate Sentry when receiving on: mediumLevelSentryActivate/Deactivate
Level 2 sentry (medium):
- Activate Sentry when receiving on: mediumLevelSentry
- Deactivate Sentry when receiving on: hardLevelSentryActivate/Deactivate
Level 3 sentry (hard):
- Activate Sentry when receiving on: hardLevelSentry
- Deactivate Sentry when receiving on: hardLevelSentryDeactivate
Well, hope that wasn’t too hard to handle.
Everything you make is hard to handle, all you type is gibberish.
Hey! How’d you come back?
A magician never reveals their secrets. Plus if I told you, you’d remove that possibility and I would remain muted.
Speaking of magicians, who wants to see me make this guy vanish?
Yes
Wait! Forums, how could you do me like this? Noooooooo-
No
Ha! You heard them! I’m staying.
You still gotta shut up.
I dunno
Does that mean I’m staying?
No, it means the decision’s up to me, and I say you’re leaving.
Ah man-
Now, we will start with the first part of our simplified explanation.
Ascension
Get a life-cycle and a counter. Have the life cycle track Player Knocks Out. And wire the life-cycle to the counter. Event Occurs → Increment Counter. Also have the relay broadcast on checkItOut. Make a property called knockoutScore. Have it’s value set to 0 (it’s a number property). Also have the counter update the property and have it increment on below0 and decrement on above7. While we already have a wire, make sure to add these broadcasts to the increment and decrement.
Now, make a trigger loop that receives on the value checkItOut. Remember to add a delay and wire them together. Make a new block and add this code.
I’ll explain this code later.
That’s it for Ascension!
Descension
Now, before you ask, what happened to the Superiority step-
Hey! What happened to the Superiority step?
I literally just said wait.
Huh, you did. Anyways, care explaining?
Yes, that step has no code or devices, only your skill. Anyways, we’re in the last leg of the race.
Yes! This stup!d guide is almost over!
One day man, one day I’m going to find out how to stop you from returning.
Remember that first life-cycle we made? Make another one that instead tracks Player Knocked Out. Wire this one again to the counter but instead have it decrement. Have the life-cycle broadcast on checkItOutExceptDecrease and make another trigger loop that will receive this. Add this code to the loop.
And now you’re done!
Behind the Scenes
Now, how exactly does this work? Simple!
When you knock out a sentry, the counter updates the property. With the trigger loop going, it constantly checks the value of the property. For example, if the property value was less than or equal to 2, we would activate the easy level sentry, and deactivate the level 0 sentry. It keeps working like this the more points you accumulate. I added a barrier, to keep the property from exceeding 6. If you’re smart, you noticed the if-statement checking if the property was equal to 6 it would broadcast on above7. Same for the below0.
Now, when we start getting knocked out, the counter decrements and reduces the property. Over time, we activate the weaker sentries and deactivate the stronger ones. It would work like the first trigger loop.
Now, you might be wondering, why did I add that activate/deactivate to some of the broadcasts? Why not make them the same? Well, my friends, I’ll tell you why not. While keeping the same broadcast would work while going up, it wouldn’t work going down. And here’s why. Let’s say we did keep the same. The easy level sentry deactivates on mediumLevelSentry and the medium level sentry activates on that same broadcast. Let’s say we go down below the requirements for the medium level sentry. Now, we would broadcast on easyLevelSentry, but it wouldn’t deactivate the medium level sentry. We could try adding the broadcast hardLevelSentry to deactivate the medium one also, but it also activated the hard level sentry. See where I’m going with this? It’s tedious.
Anyways, that should be it. Now you have a sentry that ‘adapts’ and gets harder or easier depending on how you play.
Options
Now, you don’t have to follow this system word for word. Like I said, there’s multiple ways you could make it harder. Maybe have more sentries appear to make it harder, perhaps add barriers and props for the player to hide behind to make it easier to defeat the sentries. The options are endless. I just hope this helps. Logging off, the King of Dragons!
I’m back! Wait, the guide’s over? Come o-
Difficult?
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11?
Any and all criticism is appreciated. As long as it’s not rude.