I made a hero pick system. For my map there are 3 heroes that you pick at the game start. Then I added units into a temp group to pause them and make the player pick the 3 heroes (not just 1 or 2). Everything works on single player, but the issue is when playing online (Battle.net) when I pick the 3 heroes I get disconnected from the game but the host continues the game. Can anybody solve that for me? I still need to say that there's a lil lag when picking the units (just a bit, like a spike). There are the triggers:
IMPORTANT EDIT: the error is not a fatal error, I just got disconnected from the game.
can anyone help me? i really need this system. should i use the Or - Conditions to make each hero unbuyable? please if you need some more stuff to help me i can add here. all regions are set at map initialization and player groups either.
-
Heroes Init
-
Events
- Map initialization
- Conditions
-
Actions
- Set game_herotypeagi[1] = Blademaster
- Set game_countheroes[1] = 1
- Set game_herotypeint[1] = Far Seer
- Set game_herotypeint[2] = Mortar Team
- Set game_herotypeint[3] = Priest
- Set game_herotypeint[4] = Lich (Lich)
- Set game_countheroes[2] = 4
- Set game_herotypestr[1] = Pit Lord
- Set game_herotypestr[2] = Paladin
- Set game_herotypestr[3] = Tauren
- Set game_herotypestr[4] = Mountain Giant
- Set game_countheroes[3] = 4
- Set game_countallheroes = (game_countheroes[1] + (game_countheroes[2] + game_countheroes[3]))
-
Events
-
Hero Pick
-
Events
- Unit - A unit Sells a unit
-
Conditions
- ((Sold unit) is A Hero) Equal to True
-
Actions
- Set game_heroowner = (Owner of (Sold unit))
- Set game_herotype = (Unit-type of (Sold unit))
- Set game_playernumber = (Player number of game_heroowner)
-
For each (Integer game_generalintegers[1]) from 1 to 4, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (game_heroowner is in game_playerteams[game_generalintegers[1]]) Equal to True
-
Then - Actions
- Set game_herostartloc = (Center of game_teamregion[game_generalintegers[1]])
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer game_generalintegers[1]) from 1 to game_countheroes[1], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- game_herotype Equal to game_herotypeagi[game_generalintegers[1]]
-
Then - Actions
- Unit Group - Add (Sold unit) to game_heropickgroup[game_playernumber]
- Unit - Move (Sold unit) instantly to game_herostartloc, facing Default building facing degrees
- Unit - Pause (Sold unit)
- Unit - Make (Sold unit) Invulnerable
-
For each (Integer game_generalintegers[2]) from 1 to game_countheroes[1], do (Actions)
-
Loop - Actions
- Player - Make game_herotypeagi[game_generalintegers[2]] Unavailable for training/construction by game_heroowner
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer game_generalintegers[1]) from 1 to game_countheroes[2], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- game_herotype Equal to game_herotypeint[game_generalintegers[1]]
-
Then - Actions
- Unit Group - Add (Sold unit) to game_heropickgroup[game_playernumber]
- Unit - Move (Sold unit) instantly to game_herostartloc, facing Default building facing degrees
- Unit - Pause (Sold unit)
- Unit - Make (Sold unit) Invulnerable
-
For each (Integer game_generalintegers[2]) from 1 to game_countheroes[2], do (Actions)
-
Loop - Actions
- Player - Make game_herotypeint[game_generalintegers[2]] Unavailable for training/construction by game_heroowner
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer game_generalintegers[1]) from 1 to game_countheroes[3], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- game_herotype Equal to game_herotypestr[game_generalintegers[1]]
-
Then - Actions
- Unit Group - Add (Sold unit) to game_heropickgroup[game_playernumber]
- Unit - Move (Sold unit) instantly to game_herostartloc, facing Default building facing degrees
- Unit - Pause (Sold unit)
- Unit - Make (Sold unit) Invulnerable
-
For each (Integer game_generalintegers[2]) from 1 to game_countheroes[3], do (Actions)
-
Loop - Actions
- Player - Make game_herotypestr[game_generalintegers[2]] Unavailable for training/construction by game_heroowner
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in game_heropickgroup[game_playernumber]) Equal to 3
-
Then - Actions
- Selection - Select game_heropickgroup[game_playernumber] for game_heroowner
- Camera - Pan camera for game_heroowner to game_herostartloc over 0.00 seconds
-
Unit Group - Pick every unit in game_heropickgroup[game_playernumber] and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to game_heroesgroup[game_playernumber]
- Unit - Make (Picked unit) Vulnerable
- Unit - Unpause (Picked unit)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_game_heropickgroup[udg_game_playernumber])
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation (udg_game_herostartloc)
-
Events
-
Heroes Missing Message
-
Events
- Player - (Player(1)) Selects a unit
- Player - (Player(2)) Selects a unit
- Player - (Player(3)) Selects a unit
- Player - (Player(4)) Selects a unit
- Player - (Player(5)) Selects a unit
- Player - (Player(6)) Selects a unit
- Player - (Player(7)) Selects a unit
- Player - (Player(8)) Selects a unit
- Player - (Player(9)) Selects a unit
- Player - (Player(10)) Selects a unit
- Player - (Player(11)) Selects a unit
- Player - (Player(12)) Selects a unit
-
Conditions
- ((Triggering unit) is in game_heropickgroup[(Player number of (Triggering player))]) Equal to True
-
Actions
- Game - Display to (Player group((Triggering player))) the text: You must pick 3 dif...
- Selection - Remove (Triggering unit) from selection for (Triggering player)
-
Events
can anyone help me? i really need this system. should i use the Or - Conditions to make each hero unbuyable? please if you need some more stuff to help me i can add here. all regions are set at map initialization and player groups either.
Last edited by a moderator: