- Joined
- Mar 23, 2008
- Messages
- 942
After a player choose a hero in the tavern, they are sent to their respective bases and the type of unit is stored in a variable, and the unit itself stored in another variable. Also all the players are unable to do another hero like the chosen one, and if you repick a hero, your hero is available to others players and them your new hero is not allowed to be trained.
Because this is a very important trigger, used as bases to many things, I really needs to check if its leaks.
Because this is a very important trigger, used as bases to many things, I really needs to check if its leaks.
-
Hero Purchase
-
Events
- Unit - A unit enters Heroes Tavern <gen>
-
Conditions
- (Unit-type of (Entering unit)) Not equal to Choose a Hero
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Entering unit)) is an ally of Player 1 (Red)) Equal to True
- Arena Equal to Mystic Fountain
-
Then - Actions
- Set temppoint = (Center of Base1 1 <gen>)
- Unit - Move (Entering unit) instantly to temppoint
- Camera - Pan camera for (Owner of (Entering unit)) to temppoint over 0.00 seconds
- Custom script: call RemoveLocation(udg_temppoint)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Entering unit)) is an ally of Player 2 (Blue)) Equal to True
- Arena Equal to Mystic Fountain
-
Then - Actions
- Set temppoint = (Center of Base2 1 <gen>)
- Unit - Move (Entering unit) instantly to temppoint
- Camera - Pan camera for (Owner of (Entering unit)) to temppoint over 0.00 seconds
- Custom script: call RemoveLocation(udg_temppoint)
- Else - Actions
-
If - Conditions
- Selection - Select (Entering unit) for (Owner of (Entering unit))
- -------- Here will disable new heroes --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HeroUnitType[(Player number of (Owner of (Entering unit)))] Equal to No unit-type
-
Then - Actions
- Set PlayerHero[(Player number of (Owner of (Entering unit)))] = (Entering unit)
- Set HeroUnitType[(Player number of (Owner of (Entering unit)))] = (Unit-type of (Entering unit))
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- Player - Make HeroUnitType[(Player number of (Owner of (Entering unit)))] Unavailable for training/construction by (Picked player)
-
Loop - Actions
-
For each (Integer A) from 0 to 3, do (Actions)
-
Loop - Actions
- Player - Make AllHeroes[(Integer A)] Unavailable for training/construction by (Owner of (Entering unit))
-
Loop - Actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HeroUnitType[(Player number of (Owner of (Entering unit)))] Not equal to (Unit-type of (Entering unit))
-
Then - Actions
- Set tempforce = (All players matching (((Matching player) Food used) Equal to 0))
-
Player Group - Pick every player in tempforce and do (Actions)
-
Loop - Actions
- Player - Make HeroUnitType[(Player number of (Owner of (Entering unit)))] Available for training/construction by (Picked player)
-
Loop - Actions
- Custom script: call DestroyForce(udg_tempforce)
- Set PlayerHero[(Player number of (Owner of (Entering unit)))] = (Entering unit)
- Set HeroUnitType[(Player number of (Owner of (Entering unit)))] = (Unit-type of (Entering unit))
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- Player - Make HeroUnitType[(Player number of (Owner of (Entering unit)))] Unavailable for training/construction by (Picked player)
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Last edited: