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.