Costum map

Hello everyone,

I’m currently making a map so me and 3 friends can play versus Computer
but when testing the map the Computer seemed kinda sluggish/idiotic when compared to the normal maps not fully completing bases etc. I saw something of creating an AI but that means those slots are allways active and I like to have to option to pick if we play vs different amount of Computers each game.

Any tips/advice?

1 Like

That will work with triggers. You let players choose how they want to play at lobby but when the game starts you pick all the computer players, and activate an ai for each computer player acordingly to it’s race. Something like this:

https://imgur.com/a/GWslE4R

Remember to put this and to delete the “Melee Game - Run melee AI scripts (for computer players)” action.

Edit: Just one correction at that image, the orc condition was duplicated haha, so delete the extra if/then/else. And yeah, you’ll have to create an ai for each race since the normal ai doesn’t work as you want.

1 Like

I was really stumped but now I can fiddle along, thank you once again!

EDIT:
I miss the option to pick : "player group - pick every player in ( all players controlled by computer player ) "
So im going to set it towards : “player group - pick every player ( all players )”

1 Like

You open triggers, add an action, go to player group - pick every player in player group and do multiple actions/ pick every player in (all players of control) computer player/ click ok. At Loop - Actions you add an action and click on if/then/else, multiple functions. Then you follow the other commands. The structure of the nested if’s is like this:

pick every player in player group and do multiple actions
-----pick every player in (all players of control) computer player
--------Loop - Actions
----------if/then/else, multiple functions
=======if (race comparison) - of picked player = human
=======then start campaign ai - human.ai
=======else
-----------------if/then/else, multiple functions
===========if (race comparison) - of picked player = orc
===========then start campaign ai - orc.ai
===========else
--------------------------if/then/else, multiple functions
===========if (race comparison) - of picked player = undead
=================then start campaign ai - undead.ai
=================else
--------------------------------------if/then/else, multiple functions
========if (race comparison) - of picked player = night elf
======================then start campaign ai - nightelf.ai
========================else
--------------------------------------------------Do Nothing

These campaign ai names are fictitious, you have to create an ai for each race and put the name of each ai you’ve created at it’s race.

1 Like

Ah I see under the step : pick every player in player group and do multiple actions under function I picked the option enemies of player instead of all players of control! Now indeed have the option to pick computer I didn’t even need to change much in the rest of the steps :slight_smile:

1 Like