twisterghost
New Member
- Reaction score
- 3
Hey all. This trigger isn't working right. It is supposed to make all heroes in the array Heroes_Removaarray unavailable for purchasing by the person who bought a unit. Like how DotA works for hero selection. Removing the selected hero for all players works, but removing all heroes for the purchasing player does not work.
Code:
Manage Hero Select
Events
Unit - A unit Sells a unit
Conditions
((Sold unit) is A Hero) Equal to True
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Race of (Owner of (Sold unit))) Equal to Human
Then - Actions
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Player - Make Heroes_Removearray[(Integer A)] Unavailable for training/construction by (Owner of (Sold unit))
Unit - Move (Sold unit) instantly to (Center of StartLegends <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Race of (Owner of (Sold unit))) Equal to Undead
Then - Actions
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Player - Make Heroes_Removearray[(Integer A)] Unavailable for training/construction by (Owner of (Sold unit))
Unit - Move (Sold unit) instantly to (Center of StartProdigies <gen>)
Else - Actions