BSJikan
New Member
- Reaction score
- 5
So I did these.
And it worked once. And now it dosen't work. So, I was woundering what I was missing.
And what do I need to do to add it so that the AI uses the Random Hero given. They won't use it, they only use the ones that they make from the Altar(Which I'm going to fix it so that no one can make another unit from the Altar).
Code:
Random Hero Setup
Events
Map initialization
Conditions
Actions
Set Total_Heroes = 16
Set Random_Count = 16
Set Hero_Array[1] = Paladin
Set Hero_Array[2] = Archmage
Set Hero_Array[3] = Mountain King
Set Hero_Array[4] = Blood Mage
Set Hero_Array[5] = Blademaster
Set Hero_Array[6] = Far Seer
Set Hero_Array[7] = Tauren Chieftain
Set Hero_Array[8] = Shadow Hunter
Set Hero_Array[9] = Death Knight
Set Hero_Array[10] = Lich
Set Hero_Array[11] = Dreadlord
Set Hero_Array[12] = Crypt Lord
Set Hero_Array[13] = Keeper of the Grove
Set Hero_Array[14] = Priestess of the Moon
Set Hero_Array[15] = Demon Hunter
Set Hero_Array[16] = Warden
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Set Random_Data[(Integer A)] = (Integer A)
Code:
Player 1 Remove AI Hero Item
Events
Map initialization
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) slot status) Equal to Is playing
(Player 1 (Red) controller) Equal to User
Then - Actions
Item - Remove AI Hero Creator 0282 <gen>
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) slot status) Equal to Is unused
Then - Actions
Item - Remove AI Hero Creator 0282 <gen>
Else - Actions
Do nothing
Code:
Random Hero for Player 1 AI
Events
Time - Elapsed game time is 20.00 seconds
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of AI Hero Creator 0282 <gen>) Equal to AI Hero Creator
Then - Actions
Game - Display to (All players) the text: AI Player 1 has bee...
Set Random_Hero = (Random integer number between 1 and Random_Count)
Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees
Set Random_Data[Random_Hero] = Random_Count
Set Random_Count = (Random_Count - 1)
Item - Remove AI Hero Creator 0282 <gen>
Else - Actions
Do nothing
And it worked once. And now it dosen't work. So, I was woundering what I was missing.
And what do I need to do to add it so that the AI uses the Random Hero given. They won't use it, they only use the ones that they make from the Altar(Which I'm going to fix it so that no one can make another unit from the Altar).