Guys..need help to check on the triggers below..
I don't know what goes wrong with them but there are still chances that the AI picks up the same heroes. I used this post
as my reference.
Thanks in advance
I don't know what goes wrong with them but there are still chances that the AI picks up the same heroes. I used this post
as my reference.
- For each (Integer A) from 1 to 3, do (If (((Player((Integer A))) controller) Equal to Computer) then do (Trigger - Run AI pick hero left <gen> (checking conditions)) else do (Do nothing))
- For each (Integer A) from 5 to 7, do (If (((Player((Integer A))) controller) Equal to Computer) then do (Trigger - Run AI pick hero left <gen> (checking conditions)) else do (Do nothing))
-
Actions
- Set HSS_Ai[1] = Hero1
- Set HSS_Ai[2] = Hero2
- Set HSS_Ai[3] = Hero3
- Set HSS_Ai[4] = Hero4
- Set HSS_Ai[5] = Hero5
- Set HSS_Ai[6] = Hero6
- Set HSS_AiCount = 6
- Set HSS_RandomAi = (Random integer number between 1 and HSS_AiCount)
- Set TempPoint = (Center of Teleport After Selecting Left <gen>)
- Set TempPoint2 = (Center of Teleport After Selecting Right <gen>)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Player((Integer A))) is in leftPlayers) Equal to True
-
Then - Actions
- Unit - Create 1 HSS_Ai[HSS_RandomAi] for (Player((Integer A))) at TempPoint facing Default building facing degrees
- Unit - Order (Last created unit) to Move To (Center of Unit Spwam Horde Castle <gen>)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Player((Integer A))) is in rightPlayers) Equal to True
-
Then - Actions
- Unit - Create 1 HSS_Ai[HSS_RandomAi] for (Player((Integer A))) at TempPoint2 facing Default building facing degrees
- Unit - Order (Last created unit) to Move To (Center of Unit Spwam Alliance Castle <gen>)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set HSS_Ai[HSS_RandomAi] = HSS_Ai[HSS_AiCount]
- Set HSS_AiCount = (HSS_AiCount - 1)
- Custom script: call RemoveLocation(udg_TempPoint)
- Custom script: call RemoveLocation(udg_TempPoint2)
Thanks in advance