Hi Helpers,
i want to limit the number of heroes each player can buy to 1. but for any kind of reason im to stupid to get this trigger work. the unit will not be added to the unit group.
bye
raizn
i want to limit the number of heroes each player can buy to 1. but for any kind of reason im to stupid to get this trigger work. the unit will not be added to the unit group.
Trigger:
- RemovePickedHero
- Events
- Unit - A unit Sells a unit
- Conditions
- ((Sold unit) is A Hero) Equal to True
- Actions
- Game - Display to (All players) the text: (String((Number of units in HeroGroup[(Player number of (Triggering player))])))
- Unit Group - Add (Sold unit) to HeroGroup[(Player number of (Triggering player))]
- 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)
- Loop - Actions
- Events
Trigger:
- Remove
- Events
- Unit - A unit enters (Playable map area)
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in HeroGroup[(Player number of (Owner of (Entering unit)))]) Greater than 1
- Then - Actions
- Unit - Remove (Entering unit) from the game
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
bye
raizn