• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Making a simple campaign ai

Status
Not open for further replies.
Level 3
Joined
Jan 11, 2018
Messages
23
How would I go about making an AI that creates 3 footmen from their barracks, moves them one by one to the base rally point, and when they are all finished they start an attack on the players base? The ai editor is really unintuitive as to how it is used.
 
Level 7
Joined
Dec 17, 2017
Messages
134
That is very easy. I am assuming you are a beginner in AI Editor, so look at the following points :
1. Open AI Editor
2. You will see that it wants a name. (Default is Just another Warcraft 3 AI) Enter a name.
3. Below that, you will se loads of instructions and options. You will understand everything there if you read it clearly. Those are the settings that you want your AI to have. For a Campaign AI, you should uncheck the boxes beside "Have no Mercy" and "Flee..." something, because it will look like a Melee AI, and too hard for a Campaign AI.
4. Notice, there are four tabs in the AI Editor (Notice Above), One you were working on, and other 3 beside that tab. (I cannot remember the names)
5. Now, open the second tab. Here is where you do the real settings of the AI you are creating. Here you can order your AI to build, train, research, attack, harvest gold and lumber, etc. Right click on the White portion and you will see some options. Order AI to build the following:
Great Hall (By Default)
Peasant (By Default)
Peasant (By Default)
Peasant (By default)
Barracks (Add this)
Footman (Add this)
Footman (Add this)
Footman (Add this)
Also keep in mind, do not give faulty orders to AIs. For example : You give order to train Footman without ordering them to build Barracks. That will just break the AI.
Also, you will notice that if the food goes beyond the current limit, it will colour the bar to RED, telling you to order the AI to build some farms.

You can set how many peasants (since you are referring to footmen, the race of the AI is human) will harvest the AI's Gold and Lumber. Also, in the bottom right hand side, you will set whether the AI will search for Expansions, etc. (Just read it and it will be clear.)
6. Now in that tab, you can set the attack waves. Right hand side, you will notice a place where the units are written which will be used to attack. REMEMBER, THE UNITS MUST BE IN THE ORDERS! OR ELSE IT WILL NOT WORK.
7. The remaining two tabs are not required here, so do not bother about that. Save the AI, name it, and choose where it should be saved.
8. Now, go to the Trigger Editor and go to the actions category "AI". There will be an option to run Campaign AI script for Any player. Also give the file place of the AI, you just saved.
  • Actions
    • AI - Run Campaign AI script for Player 2 (Purple) using campaign.ai (insert your ai path here)
9. And remember to give starting location to the Player!
Hope I helped. If you need more explanation, search on HIVE or go to Turnro's channel on Youtube. (Search 'Turnro' in the search bar)
Also, you can use Jass, but it is a little complicated.
 
Status
Not open for further replies.
Top