Blocksworld

Blocksworld

Not enough ratings
How to make an AI
By EthanclineW
Ever wanted to make an AI, but don't know how to? This guide will help you on how to make a melee AI!
   
Award
Favorite
Favorited
Unfavorite
Introduction
Ever wanted to make a battle AI in Blocksworld, but you don't know how to? Well it's pretty easy! Today I will show you how to make an AI. Let's get right into building!
Design Your Blockster
The first step is really important; designing a blockster for your AI you will make! For today, I turned a normal blockster into a blockster from a magic show!

After designing your blockster, think of a name for it. Eventually, it'll be the name of your AI. I chose Show Biz Blockster, because it's from a magic show!
The Intro Quote
After thinking of a name and designing your blockster, I think it's now time to move on to the next step, intro quotes! Although they aren't really necessary, it adds a little context to your AI!

To make an intro quote, go to the blockster's action panel. Then add the code:
On play (>) Speak
When you add the speak action, it should take you to where you're able to edit the speech! This'll be our intro quote. Then, type in your intro quote. I put "Oh, my tophat!" just for the knack of it, since I couldn't think of anything else.

Adding A Health Bar
Now that we added an intro quote, why don't we add a health bar? A health bar is really important for your AI. Without it, other AIs can't defeat it! It's pretty easy to add a health bar sometimes; just put it on top of the blockster's head! But in this case, I won't be able to due to the tophat, so I have to use merging to get the health bar on that blockster.

Now we need to add a hero or villain tag to the AI. Select the blockster's panel, then add the following code if you want to make your AI a hero:

(>) Hero
Sight Line Villain (>) Model Signal "SeeVillain"
No Sight Line Villain (>) Model Signal "NoVillain"


Otherwise, if you wanna make your AI a villain, add this code:

(>) Villain
Sight Line Hero (>) Model Signal "SeeVillain"
No Sight Line Hero (>) Model Signal "NoVillain
"

Then, if your AI is a hero, remove the villain tag, but not the sight line. Otherwise, if it's a villain, remove the hero tag.
Adding A Weapon
Let's add a weapon now. If you want your blockster to attack and defeat the other AIs, then add a weapon! We'll do a melee weapon for now. Next time, I might do a tutorial on how to make a ranged battle AI.
First, go to the gear section. It should be the column that has a hat! Scroll down until you see a sword. Pick any weapon. For me, I picked a baton, since it's also related to my AI. Then, drag it to the blockster's hand. You might need to turn it for the blockster to hold it perfectly. Now, at the weapon's action panel, add the following code:

(>) Triangle Tag
Model Signal "NoVillain" (>) Hide
Model Signal "SeeVillain" (>) Appear
Hit Block Villain (or Hit Block Hero) (>) Explode (Radius 1.0)


Use Hit Block Villain if your AI attacks villains. Otherwise, if it attacks heroes, use Hit Block Hero, just for the block only, and not the model.



Then, select the blockster to go to its action panel. Add the following code:

If your AI's a hero:
Model Signal "SeeVillain" (>) Chase Villain

However. if it's a villain:
Model Signal "SeeVillain" (>) Chase Hero
Conclusion
Now you have successfully made your AI! Here's what my final product looks like:


8 Comments
zane [Nessie] Oct 11, 2022 @ 5:38pm 
im still using the mobile app, works fine except community stuff.
squidiskool Jun 30, 2021 @ 9:16am 
Gr Ethan Great Value
Leyozman Feb 23, 2021 @ 9:31am 
I used to play BW before the shutdown, i forgotten some stuff since I wasn't able to play it for so long, at least i'm in the 2nd server.
noobert May 21, 2020 @ 5:42pm 
This is a great guide, Ethan!
If you don't know me, I was one of the contestants in your old tournament!
I'm using this guide to make an A.I right now. Keep up the great work!

-TheNoobzArmy
Enderjed Mar 23, 2020 @ 12:24pm 
I know this is unrelated, but just the former Premium BW user known as "m.s.mike" saying hello.
Nolan Corbet Feb 1, 2020 @ 2:21pm 
Hello can you make a guide on how to make the star wars AI in that one world please Thanks!
AlexBW145 Sep 3, 2019 @ 5:14pm 
hey a request here..
how can i make an health bar go away?
akarilogic Apr 27, 2019 @ 8:42am 
this guide is more useful.

for everyone, they’ll always repeat this step.

yeet