Hello
I am trying to make a god selection system. But it didn't seem to work. I will post the triggers as well the map. Please help me to fix it ^_^
I am trying to make a god selection system. But it didn't seem to work. I will post the triggers as well the map. Please help me to fix it ^_^
Trigger:
- Init
- Events
- Map initialization
- Conditions
- Actions
- Set GOD_ButtonNumber = 8
- Set GOD_Buton_Name[1] = Zeus
- Set GOD_Buton_Name[2] = Meus
- Set GOD_Buton_Name[3] = Heus
- Set GOD_Buton_Name[4] = Feus
- Set GOD_Buton_Name[5] = Geus
- Set GOD_Buton_Name[6] = Deyyus
- Set GOD_Buton_Name[7] = Otuz
- Set GOD_Buton_Name[8] = Bokuz
- Set GOD_Ability[1] = God 1
- Set GOD_Ability[2] = God 2
- Set GOD_Ability[3] = God 3
- Set GOD_Ability[4] = God 4
- Set GOD_Ability[5] = God 5
- Set GOD_Ability[6] = God 6
- Set GOD_Ability[7] = God 7
- Set GOD_Ability[8] = God 8
- Events
Trigger:
- Hero
- Events
- Unit - A unit Sells a unit
- Conditions
- ((Sold unit) is A Hero) Equal to True
- Actions
- Set GOD_PlayerNumber = (Player number of (Owner of (Sold unit)))
- Set GOD_Hero[GOD_PlayerNumber] = (Sold unit)
- Dialog - Change the title of GOD_Dialog[GOD_PlayerNumber] to Select Your God
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- For each (Integer B) from 1 to GOD_ButtonNumber, do (Actions)
- Loop - Actions
- Dialog - Create a dialog button for GOD_Dialog[(Integer A)] labelled GOD_Buton_Name[(Integer B)]
- Set GOD_DialogButton[((((Integer A) - 1) x (Integer A)) + (Integer B))] = (Last created dialog Button)
- Game - Display to (All players) the text: (String(((((Integer A) - 1) x (Integer A)) + (Integer B))))
- Loop - Actions
- For each (Integer B) from 1 to GOD_ButtonNumber, do (Actions)
- Loop - Actions
- Dialog - Show GOD_Dialog[GOD_PlayerNumber] for (Player(GOD_PlayerNumber))
- Events
Trigger:
- Click
- Events
- Dialog - A dialog button is clicked for GOD_Dialog[1]
- Dialog - A dialog button is clicked for GOD_Dialog[2]
- Dialog - A dialog button is clicked for GOD_Dialog[3]
- Dialog - A dialog button is clicked for GOD_Dialog[4]
- Dialog - A dialog button is clicked for GOD_Dialog[5]
- Dialog - A dialog button is clicked for GOD_Dialog[6]
- Dialog - A dialog button is clicked for GOD_Dialog[7]
- Dialog - A dialog button is clicked for GOD_Dialog[8]
- Dialog - A dialog button is clicked for GOD_Dialog[9]
- Dialog - A dialog button is clicked for GOD_Dialog[10]
- Dialog - A dialog button is clicked for GOD_Dialog[11]
- Dialog - A dialog button is clicked for GOD_Dialog[12]
- Conditions
- Actions
- For each (Integer A) from 1 to (12 x GOD_ButtonNumber), do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to GOD_DialogButton[(Integer A)]
- Then - Actions
- Game - Display to (All players) the text: TIK
- Game - Display to (All players) the text: (You have prayed to + (GOD_Buton_Name[((Integer A) mod GOD_ButtonNumber)] + to become your God.))
- Unit - Add GOD_Ability[((Integer A) mod GOD_ButtonNumber)] to GOD_Hero[(Player number of (Triggering player))]
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to (12 x GOD_ButtonNumber), do (Actions)
- Events