- Joined
- Sep 24, 2007
- Messages
- 300
The following bugs are the last known bugs in my map, so x10 to those who help me.
1. Renew towers trigger: After you buy the item, trigger checks if any of towers is missing (already destroyed) and if the region of specific tower is empty, trigger creates one tower. Preety simple, but trigger won't work.
2. Unstuck command: After player types -unstuck, his hero is moved in base. Hero must not move for 1 minute for the command to work. Trigger doesn't work.
3. When any hero enters the base (base is the same for both teams), a neutral unit uses silence, so the heroes cannot attack or use spells in base. When hero leaves the base, silence buff is removed.
This works good, but there is just one problem. One of my heroes has Avatar ability, so if you enter base with avatar on, you are not silenced and you can kill all others. How to avoid this problem and keep the silence at the same time?
That's all, thanks for all answers.
1. Renew towers trigger: After you buy the item, trigger checks if any of towers is missing (already destroyed) and if the region of specific tower is empty, trigger creates one tower. Preety simple, but trigger won't work.
- EVENT
- Unit - A unit Acquires an item
- CONDITIONS
- ((Triggering unit) is A Hero) Equal to True
- ACTIONS
- -------- RENEW TOWERS --------
- -------- HUMAN TOWERS --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Hero manipulating item) has an item of type |cffffcc00Renew towers|r) Equal to True
- (Player number of (Owner of (Hero manipulating item))) Less than or equal to 5
-
Then - Actions
- Item - Remove (Item carried by (Hero manipulating item) of type |cffffcc00Renew towers|r)
-
Unit Group - Pick every unit in (Units in LSHuDownTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Guard Tower
-
Then - Actions
- Unit Group - Remove all units from TowersGroup
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- Game - Display to (All players) the text: (String(TowerRenew))
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Guard Tower for Player 12 (Brown) at (Center of LSHuDownTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in LSHuUpTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Guard Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Guard Tower for Player 12 (Brown) at (Center of LSHuUpTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in LCHuTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Guard Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Guard Tower for Player 12 (Brown) at (Center of LCHuTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in RCHuTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Guard Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Guard Tower for Player 12 (Brown) at (Center of RCHuTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in RSHuUpTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Guard Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Guard Tower for Player 12 (Brown) at (Center of RSHuUpTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in RSHuDownTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Guard Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Guard Tower for Player 12 (Brown) at (Center of RSHuDownTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Else - Actions
-
If - Conditions
- -------- ORC TOWERS --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Hero manipulating item) has an item of type |cffffcc00Renew towers|r) Equal to True
- (Player number of (Owner of (Hero manipulating item))) Greater than or equal to 6
-
Then - Actions
- Item - Remove (Item carried by (Hero manipulating item) of type |cffffcc00Renew towers|r)
-
Unit Group - Pick every unit in (Units in LSOrcUpTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Watch Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Watch Tower for Player 11 (Dark Green) at (Center of LSOrcUpTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in LSOrcDOwnTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Watch Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Watch Tower for Player 11 (Dark Green) at (Center of LSOrcDOwnTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in LCOrcTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Watch Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Watch Tower for Player 11 (Dark Green) at (Center of LCOrcTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in RCOrcTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Watch Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Watch Tower for Player 11 (Dark Green) at (Center of RCOrcTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in RSOrcDownTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Watch Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Watch Tower for Player 11 (Dark Green) at (Center of RSOrcDownTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in RSOrcUpTower <gen>) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Picked unit)) Equal to Watch Tower
-
Then - Actions
- Unit Group - Add (Picked unit) to TowersGroup
- Set TowerRenew = (Number of units in TowersGroup)
- If (TowerRenew Equal to 0) then do (Unit - Create 1 Watch Tower for Player 11 (Dark Green) at (Center of RSOrcUpTower <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)
- Unit Group - Remove all units from TowersGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Else - Actions
-
If - Conditions
2. Unstuck command: After player types -unstuck, his hero is moved in base. Hero must not move for 1 minute for the command to work. Trigger doesn't work.
-
Unstuck
-
Events
- Player - Player 1 (Red) types a chat message containing -unstuck as An exact match
- Player - Player 2 (Blue) types a chat message containing -unstuck as An exact match
- Player - Player 3 (Teal) types a chat message containing -unstuck as An exact match
- Player - Player 4 (Purple) types a chat message containing -unstuck as An exact match
- Player - Player 5 (Yellow) types a chat message containing -unstuck as An exact match
- Player - Player 6 (Orange) types a chat message containing -unstuck as An exact match
- Player - Player 7 (Green) types a chat message containing -unstuck as An exact match
- Player - Player 8 (Pink) types a chat message containing -unstuck as An exact match
- Player - Player 9 (Gray) types a chat message containing -unstuck as An exact match
- Player - Player 10 (Light Blue) types a chat message containing -unstuck as An exact match
- Conditions
-
Actions
-
Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A Hero) Equal to True
- (Unit-type of (Picked unit)) Not equal to Item carrier
-
Then - Actions
- Set UnstuckHero[(Player number of (Triggering player))] = (Picked unit)
- Game - Display to (Player group((Triggering player))) the text: Your hero will be u...
- Set UnstuckCheck[(Player number of (Triggering player))] = 1
- Set UnstuckPlayer[(Player number of (Triggering player))] = (Triggering player)
- Wait 3.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 1 (Red)
-
Then - Actions
- Trigger - Turn on Player1 Unstuck <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 2 (Blue)
-
Then - Actions
- Trigger - Turn on Player2 Unstuck <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 3 (Teal)
-
Then - Actions
- Trigger - Turn on Player3 Unstuck <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 4 (Purple)
-
Then - Actions
- Trigger - Turn on Player4 Unstuck <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 5 (Yellow)
-
Then - Actions
- Trigger - Turn on Player5 Unstuck <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 6 (Orange)
-
Then - Actions
- Trigger - Turn on Player6 Unstuck <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 7 (Green)
-
Then - Actions
- Trigger - Turn on Player7 Unstuck <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 8 (Pink)
-
Then - Actions
- Trigger - Turn on Player8 Unstuck <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 9 (Gray)
-
Then - Actions
- Trigger - Turn on Player9 Unstuck <gen>
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckPlayer[(Player number of (Triggering player))] Equal to Player 10 (Light Blue)
-
Then - Actions
- Trigger - Turn on Player10 Unstuck <gen>
- 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)
-
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)
-
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)
-
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)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Wait 57.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckCheck[(Player number of (Triggering player))] Equal to 1
-
Then - Actions
- Unit - Move UnstuckHero[(Player number of (Triggering player))] instantly to (Position of Fountain 0075 <gen>)
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
- Set UnstuckPlayer[(Integer A)] = Player 11 (Dark Green)
-
Loop - Actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- UnstuckCheck[(Player number of (Triggering player))] Equal to 0
-
Then - Actions
- Do nothing
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
-
Events
-
Player1 Unstuck
-
Events
- Unit - A unit Is issued an order targeting a point
- Unit - A unit Is issued an order with no target
- Unit - A unit Is issued an order targeting an object
-
Conditions
- (Owner of (Triggering unit)) Equal to Player 1 (Red)
-
Actions
- Set UnstuckCheck[1] = 0
- Wait 57.00 seconds
- Trigger - Turn off (This trigger)
-
Events
3. When any hero enters the base (base is the same for both teams), a neutral unit uses silence, so the heroes cannot attack or use spells in base. When hero leaves the base, silence buff is removed.
This works good, but there is just one problem. One of my heroes has Avatar ability, so if you enter base with avatar on, you are not silenced and you can kill all others. How to avoid this problem and keep the silence at the same time?
That's all, thanks for all answers.