- Joined
- Jun 2, 2009
- Messages
- 1,233
Hello everyone. I have created AI system for my map and i can give them random heroes. But the problem is, they can pick the same heroes. How can i prevent this? Here is my system.
Players are selecting heroes from taverns by clicking
Bots are selecting heroes from random list.
1-) Remove selected hero from marketplaces
2-) Prevent bots to pick same heroes.
-
Events
-
Time - Elapsed game time is 2.00 seconds
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Player((Integer A))) controller) Equal to Computer
-
BotHeroSecti[(Integer A)] Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Player number of (Player((Integer A)))) Less than or equal to 6
-
-
Then - Actions
-
Set BotHeroSecti[(Integer A)] = True
-
Unit - Create 1 BotHerolar[(Random integer number between 1 and 54)] for (Player((Integer A))) at (Center of GameGuideDevil <gen>) facing Default building facing degrees
-
Set zU_AIHero[(Integer A)] = (Last created unit)
-
Unit Group - Add (Last created unit) to HerolarALL
-
Unit Group - Add (Last created unit) to HerolarDevilAll
-
Unit Group - Add (Last created unit) to HerolarBotALL
-
Unit Group - Add (Last created unit) to HerolarBotDevil
-
Player Group - Add (Player((Integer A))) to ClanDevilPlayers
-
Player Group - Add (Player((Integer A))) to ClanDevilBotlar
-
Player Group - Add (Player((Integer A))) to Botlar
-
Unit - Set the custom value of (Last created unit) to 0
-
Set HeroCountDevil = (HeroCountDevil + 1)
-
-
-
-
-
-
-
-
Unit - Create 1 BotHerolar[(Random integer number between 1 and 54)] for (Player((Integer A))) at (Center of GameGuideDevil <gen>) facing Default building facing degrees
Players are selecting heroes from taverns by clicking
Bots are selecting heroes from random list.
1-) Remove selected hero from marketplaces
2-) Prevent bots to pick same heroes.