- Joined
- Feb 20, 2020
- Messages
- 207
Hello!
I need to fix this trigger, the idea of the trigger is, a hero unit dies, wait 30 sec, create another random hero in the same region of the dying one, i need it to work for multiple heroes dying at the same time.
It is only reviving the last monster.
I need to fix this trigger, the idea of the trigger is, a hero unit dies, wait 30 sec, create another random hero in the same region of the dying one, i need it to work for multiple heroes dying at the same time.
It is only reviving the last monster.
-
Melee Initialization
-
Events
- Map initialization
- Conditions
-
Actions
- Set VariableSet ForestRegions[1] = Flor1 <gen>
- Set VariableSet ForestRegions[2] = Flor2 <gen>
- Set VariableSet ForestRegions[3] = Flor3 <gen>
- Set VariableSet ForestRegions[4] = Flor4 <gen>
- Set VariableSet ForestRegions[5] = Flor5 <gen>
-
For each (Integer A) from 1 to 5, do (Actions)
-
Loop - Actions
- Set VariableSet RandomForestChance = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RandomForestChance Less than or equal to 20
-
Then - Actions
- Unit - Create 1 Paladin for Player 11 (Dark Green) at (Center of ForestRegions[(Integer A)]) facing Default building facing degrees
- Unit Group - Add (Last created unit) to ForestGroup
- Set VariableSet ForestMonsterList[(Integer A)] = (Last created unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RandomForestChance Less than or equal to 40
-
Then - Actions
- Unit - Create 1 Archmage for Player 11 (Dark Green) at (Center of ForestRegions[(Integer A)]) facing Default building facing degrees
- Unit Group - Add (Last created unit) to ForestGroup
- Set VariableSet ForestMonsterList[(Integer A)] = (Last created unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RandomForestChance Less than or equal to 70
-
Then - Actions
- Unit - Create 1 Mountain King for Player 11 (Dark Green) at (Center of ForestRegions[(Integer A)]) facing Default building facing degrees
- Unit Group - Add (Last created unit) to ForestGroup
- Set VariableSet ForestMonsterList[(Integer A)] = (Last created unit)
-
Else - Actions
- Unit - Create 1 Blood Mage for Player 11 (Dark Green) at (Center of ForestRegions[(Integer A)]) facing Default building facing degrees
- Unit Group - Add (Last created unit) to ForestGroup
- Set VariableSet ForestMonsterList[(Integer A)] = (Last created unit)
-
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
-
Loop - Actions
-
Events
-
Respawn
-
Events
- Unit - A unit Dies
-
Conditions
- ((Dying unit) is in ForestGroup.) Equal to True
- ((Dying unit) is A Hero) Equal to True
- (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
-
Actions
- Set VariableSet MonsterDead = (Dying unit)
-
For each (Integer A) from 1 to 5, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MonsterDead Equal to ForestMonsterList[(Integer A)]
-
Then - Actions
- Unit Group - Remove MonsterDead from ForestGroup.
- Countdown Timer - Start ForestMonsterTimer as a One-shot timer that will expire in 30.00 seconds
- Set VariableSet MonsterNumber = (Integer A)
- Set VariableSet ForestPositionRespawn = ForestRegions[MonsterNumber]
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
-
Respawn New
-
Events
- Time - ForestMonsterTimer expires
- Conditions
-
Actions
- Set VariableSet RandomForestChance = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RandomForestChance Less than or equal to 20
-
Then - Actions
- Unit - Create 1 Paladin for Player 11 (Dark Green) at (Center of ForestPositionRespawn) facing Default building facing degrees
- Unit Group - Add (Last created unit) to ForestGroup
- Set VariableSet ForestMonsterList[MonsterNumber] = (Last created unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RandomForestChance Less than or equal to 40
-
Then - Actions
- Unit - Create 1 Archmage for Player 11 (Dark Green) at (Center of ForestPositionRespawn) facing Default building facing degrees
- Unit Group - Add (Last created unit) to ForestGroup
- Set VariableSet ForestMonsterList[MonsterNumber] = (Last created unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RandomForestChance Less than or equal to 70
-
Then - Actions
- Unit - Create 1 Mountain King for Player 11 (Dark Green) at (Center of ForestPositionRespawn) facing Default building facing degrees
- Unit Group - Add (Last created unit) to ForestGroup
- Set VariableSet ForestMonsterList[MonsterNumber] = (Last created unit)
-
Else - Actions
- Unit - Create 1 Blood Mage for Player 11 (Dark Green) at (Center of ForestPositionRespawn) facing Default building facing degrees
- Unit Group - Add (Last created unit) to ForestGroup
- Set VariableSet ForestMonsterList[MonsterNumber] = (Last created unit)
-
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
-
Events
Last edited: