• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:46
CEST 15:46
KST 22:46
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL21] Ro24 Preview Pt2: News Flash8[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy15ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book20
Community News
Weekly Cups (March 23-29): herO takes triple6Aligulac acquired by REPLAYMAN.com/Stego Research7Weekly Cups (March 16-22): herO doubles, Cure surprises3Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool49Weekly Cups (March 9-15): herO, Clem, ByuN win4
StarCraft 2
General
Team Liquid Map Contest #22 - Presented by Monster Energy Aligulac acquired by REPLAYMAN.com/Stego Research Weekly Cups (March 23-29): herO takes triple What mix of new & old maps do you want in the next ladder pool? (SC2) herO wins SC2 All-Star Invitational
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament RSL Season 4 announced for March-April StarCraft Evolution League (SC Evo Biweekly) WardiTV Mondays World University TeamLeague (500$+) | Signups Open
Strategy
Custom Maps
[M] (2) Frigid Storage Publishing has been re-enabled! [Feb 24th 2026]
External Content
Mutation # 519 Inner Power The PondCast: SC2 News & Results Mutation # 518 Radiation Zone Mutation # 517 Distant Threat
Brood War
General
ASL21 General Discussion A cwal.gg Extension - Easily keep track of anyone Behind the scenes footage of ASL21 Group E BW General Discussion BGH Auto Balance -> http://bghmmr.eu/
Tourneys
🌍 Weekly Foreign Showmatches [ASL21] Ro24 Group E [ASL21] Ro24 Group F Azhi's Colosseum - Foreign KCM
Strategy
Fighting Spirit mining rates What's the deal with APM & what's its true value Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Starcraft Tabletop Miniature Game General RTS Discussion Thread Darkest Dungeon
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Things Aren’t Peaceful in Palestine The Games Industry And ATVI European Politico-economics QA Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread General nutrition recommendations
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1742 users

Custom map with Computer players?

Forum Index > SC2 Maps & Custom Games
Post a Reply
Coldlogic
Profile Joined December 2008
United States116 Posts
November 15 2012 19:53 GMT
#1
I am creating a training map and I would like to be able to allow computer players to be opponents. However, when ever I add an AI and start the game, none of the triggers fire. So no units get created, no menus show, and its basically a screen of the map covered in fog of war because you aren't able to do anything at all. Is there some setting I have missed that allows computer players on custom maps?

If I run the map with just me in the lobby (no computer players), all of the triggers work fine and everything. I thought this might be an acceptable solution, and then would just initialize the computer in the game. However, when I try to start the AI, the computer player doesn't move or do anything. It doesn't start gathering resources and leaves all its workers idle. I have tried both MeleeInitAI() and AIStart(2, false, 200) in an effort to make the computer player do something, but they are proving to be rather stubborn. Am I missing another function call to get the AI players going or something?

These all seem like easy questions that someone with more experience knows how to solve in a matter of seconds, but I really can't figure out what to do.

I've also posted on the SC2 Forums here: http://us.battle.net/sc2/en/forum/topic/7163736306
Quakecomm
Profile Joined April 2012
United States344 Posts
November 16 2012 01:32 GMT
#2
Did you try putting the A.I. in in the map editor instead of adding them in the lobby?
Just a thought, I don't know if it would under mind your map.
gorkey island is the only good map
The_Frozen_Inferno
Profile Joined September 2012
Canada98 Posts
November 16 2012 02:33 GMT
#3
SC2mapster is probably a better place to go than here or Bnet. . . the skilled mappers don't really frequent Bnet or TL.

***

I'm not sure about all the details of your map, so some of this might not apply:

And I'm no expert at triggers, but if it's just getting the units to go to do standard melee stuff, use the default built-in start triggers.

F6 to open trigger menu:

Event: Map initialization (or map restart, or whatever event you have going on)

Action: set melee starting resources for all players
Action: create melee starting units for all players
Action: start the melee AI for all computer players
Action: set default melee options for all players

If I recall correctly, initializing the melee AI only gets it ready for use (for example, if a human player leaves the game, you have to initiate the AI for that player if you want a bot to take over for that player.) But you have to actually 'start' the AI for it to take effect and start doing stuff. And there are 2 different sets of default AI that you have to specify between (melee of campaign)


When you add an AI player in the lobby, it already initializes the AI, so the basic melee triggers just start it. But if you just spawned a base after game initialization for player N, then you have to initialize the AI for player N and then after that start the melee AI.

And you also have to make sure that you set the proper melee options and resources for the AI or it doesn't know what to do.
Also, did you add proper starting location markers for each player? If you don't, the melee AI doesn't work properly either.
In Bizarro World, I ladder more than I make custom maps
Coldlogic
Profile Joined December 2008
United States116 Posts
November 16 2012 06:38 GMT
#4
On November 16 2012 10:32 Quakecomm wrote:
Did you try putting the A.I. in in the map editor instead of adding them in the lobby?
Just a thought, I don't know if it would under mind your map.


Yes, I have game variants for 1v1 vs comp and 1v1 vs player, the variant forces the computer player to the second team. I suppose i could try hard coding the player property to a computer, however I am really looking to make it to where you can add an AI player or invite a friend regardless of which variant you choose. I've noticed that YABOT maps do this. You can add a computer player and every trigger fires regularly, however they use the Green Tea AI suite, so maybe that has something to do with it. I'm currently digging through their tens of thousands of lines of code to try and figure out how they are doing what I seem to be unable to accomplish.

On November 16 2012 11:33 The_Frozen_Inferno wrote:
SC2mapster is probably a better place to go than here or Bnet. . . the skilled mappers don't really frequent Bnet or TL.


Yea, I kinda felt that SC2Mapster seemed dead. I'll try posting there and pray for a response.

I'm not sure about all the details of your map, so some of this might not apply:

And I'm no expert at triggers, but if it's just getting the units to go to do standard melee stuff, use the default built-in start triggers.

F6 to open trigger menu:

Event: Map initialization (or map restart, or whatever event you have going on)

Action: set melee starting resources for all players
Action: create melee starting units for all players
Action: start the melee AI for all computer players
Action: set default melee options for all players

If I recall correctly, initializing the melee AI only gets it ready for use (for example, if a human player leaves the game, you have to initiate the AI for that player if you want a bot to take over for that player.) But you have to actually 'start' the AI for it to take effect and start doing stuff. And there are 2 different sets of default AI that you have to specify between (melee of campaign)


When you add an AI player in the lobby, it already initializes the AI, so the basic melee triggers just start it. But if you just spawned a base after game initialization for player N, then you have to initialize the AI for player N and then after that start the melee AI.

And you also have to make sure that you set the proper melee options and resources for the AI or it doesn't know what to do.
Also, did you add proper starting location markers for each player? If you don't, the melee AI doesn't work properly either.


A little background on my map: It is a terrain port of Cloud Kingdom. I have the hopes of creating a customizable script that I just import to any terrain map and then the system I am implementing will work on said map. This way I can easy add new map pool maps to the system. So all the start locations are accounted for. The first screen the player sees is a menu where they are able to choose between the three races, a league goal (this sets constraints such as # of supply blocks allowed and max energy per energy unit), and then a step of the training system that restricts tech. After a person chooses a step, the game begins. Here is my AI init function


void InitAI() {
      if(numberOfPlayers == 1) {
            playerRaces[1] = RandomRace();
            CreateStartingUnits(2);
            Wait(3.0, c_timeReal);
            Log("Starting AI");
            MeleeInitAI();                   //This is the "Init Melee AI for All Players" trigger
            AIStart(2, false, 200);       // Starts melee AI for player 2 with 200 apm
      }
}


So i make a random race for the computer. Creating their melee starting units (base + 6 workers). I put in a wait because I thought there might be a chance that the units weren't ready, so initing the AI wasn't having the effect, but this didnt work either. Then I init the melee AI, and start a new melee ai for player 2.
Please log in or register to reply.
Live Events Refresh
WardiTV Team League
12:45
Group B
WardiTV519
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
LamboSC2 188
SortOf 139
ProTech122
StarCraft: Brood War
Calm 7003
Bisu 3046
Sea 2522
Horang2 1667
Hyuk 952
Shuttle 886
EffOrt 856
Mini 629
Soma 498
Stork 488
[ Show more ]
firebathero 452
actioN 357
ggaemo 348
Rush 284
Snow 266
Soulkey 186
PianO 150
hero 136
Last 102
sorry 69
Sea.KH 57
[sc1f]eonzerg 55
Hyun 50
Barracks 47
Backho 44
Aegong 35
Shinee 30
zelot 26
Movie 23
910 20
Terrorterran 19
Hm[arnc] 18
scan(afreeca) 14
IntoTheRainbow 13
Rock 13
ajuk12(nOOB) 10
soO 5
Dota 2
Gorgc6170
BananaSlamJamma612
canceldota107
Counter-Strike
x6flipin511
edward90
oskar50
Heroes of the Storm
XaKoH 133
Other Games
singsing1855
B2W.Neo993
hiko482
Lowko294
crisheroes290
DeMusliM269
RotterdaM117
KnowMe101
ArmadaUGS89
QueenE54
Livibee52
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• iHatsuTV 1
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis2253
• Jankos2019
• TFBlade1041
Upcoming Events
OSC
10h 14m
RSL Revival
20h 14m
TriGGeR vs Cure
ByuN vs Rogue
Replay Cast
1d 10h
RSL Revival
1d 20h
Maru vs MaxPax
BSL
2 days
RSL Revival
2 days
uThermal 2v2 Circuit
3 days
BSL
3 days
Afreeca Starleague
3 days
Replay Cast
4 days
[ Show More ]
Sparkling Tuna Cup
4 days
The PondCast
6 days
Liquipedia Results

Completed

Proleague 2026-03-31
WardiTV Winter 2026
NationLESS Cup

Ongoing

BSL Season 22
CSL Elite League 2026
CSL Season 20: Qualifier 1
ASL Season 21
CSL Season 20: Qualifier 2
RSL Revival: Season 4
Nations Cup 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

Escore Tournament S2: W1
CSL 2026 SPRING (S20)
Acropolis #4
IPSL Spring 2026
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
StarCraft2 Community Team League 2026 Spring
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.