• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Adding AI players in-game

Status
Not open for further replies.
Level 5
Joined
Nov 27, 2007
Messages
85
Hello, when I am in game, I'd like to add some computer players to my map.

For example, command "-addbot 6 easy" creates a computer player with id 6 and easy difficulty.

So the func would look like

function AddComputerPlayer takes integer id, string ai_level returns nothing
// what should be the content of this function??
endfunction

What should be inside this function ?
Or maybe I should use something from common.j / blizzard.j ?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Hello, when I am in game, I'd like to add some computer players to my map.

For example, command "-addbot 6 easy" creates a computer player with id 6 and easy difficulty.

So the func would look like

function AddComputerPlayer takes integer id, string ai_level returns nothing
// what should be the content of this function??
endfunction

What should be inside this function ?
Or maybe I should use something from common.j / blizzard.j ?

Check out the melee game functions, they have it in them somewhere.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
I do agree with Chaosy. If you are trying to make a map that is not melee you will have to create your own custom AI Script for the original one as far as I now only works for Melee type of maps.

And when you created the AI Script, just add them to Bots when those specific commands are typed though I dont know how will you add it.
 
Status
Not open for further replies.
Top