Goal
I'm making a MUI system that, when your hero's mana is below 20%, a wave of creeps spawn and they will keep getting harder until the hero has higher mana amount than 20%.
Things I've done
I made a tavern system that assign picked hero as Worker[Player Number].
I ran this trigger at Map Initialization to set creep types and amount of them for each level.
I can't find a way to loop the Countdown Timer event so i code every trigger manually for each player (1->6).
(Also my creeps keep getting spawned in the wall or tree so I have to turn off their collision, is there any better way than this? Because collision off means they will stack on each other if spawned in a wave and thats not very appealing).
Then reset the process.
But nothing worked at all
There is only one creep spawn and nothing comes after. The special effect is glitchy as hell after the hero gains over 20% mana.
The only one who got insane is me now pls help...
Thanks so much for helping.
I'm making a MUI system that, when your hero's mana is below 20%, a wave of creeps spawn and they will keep getting harder until the hero has higher mana amount than 20%.
Things I've done
I made a tavern system that assign picked hero as Worker[Player Number].
I ran this trigger at Map Initialization to set creep types and amount of them for each level.
-
Shadow Wave Init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set ShadowUnits[1] = Shadow Creeper
-
Set ShadowUnits[2] = Shadow Creeper
-
Set ShadowUnits[3] = Shadow Walker
-
Set ShadowUnits[4] = Shadow Walker
-
Set ShadowUnits[5] = Shadow Walker
-
Set ShadowUnits[6] = Shadow Charger
-
Set ShadowUnits[7] = Shadow Charger
-
Set AmountOfShadows[1] = 1
-
Set AmountOfShadows[2] = 2
-
Set AmountOfShadows[3] = 1
-
Set AmountOfShadows[4] = 2
-
Set AmountOfShadows[5] = 3
-
Set AmountOfShadows[6] = 1
-
Set AmountOfShadows[7] = 2
-
-
-
Lower20
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Percentage mana of Worker[(Integer A)]) Less than or equal to 20.00
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShadowSpawn[(Integer A)] Equal to 0.00
-
-
Then - Actions
-
Set ShadowSpawn[(Integer A)] = 1.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShadowEffect[(Integer A)] Equal to 0.00
-
-
Then - Actions
-
Set ShadowEffect[(Integer A)] = 1.00
-
Special Effect - Create a special effect attached to the overhead of Worker[(Integer A)] using Abilities\Spells\NightElf\shadowstrike\shadowstrike.mdl
-
Set SanityEffect[(Integer A)] = (Last created special effect)
-
Trigger - Run Shadow Wave Trigger <gen> (checking conditions)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
Special Effect - Destroy SanityEffect[(Integer A)]
-
Set ShadowSpawn[(Integer A)] = 0.00
-
Set ShadowEffect[(Integer A)] = 0.00
-
-
-
-
-
-
-
Shadow Wave Trigger
-
Events
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShadowSpawn[(Integer A)] Equal to 1.00
-
-
Then - Actions
-
Set ShadowSpawn[(Integer A)] = 2.00
-
Set ShadowLevels[(Integer A)] = 1
-
Set ShadowWaveDice[(Integer A)] = (Random real number between 15.00 and 30.00)
-
Countdown Timer - Start ShadowWaveTimer[(Integer A)] as a One-shot timer that will expire in ShadowWaveDice[(Integer A)] seconds
-
-
Else - Actions
-
-
-
-
-
(Also my creeps keep getting spawned in the wall or tree so I have to turn off their collision, is there any better way than this? Because collision off means they will stack on each other if spawned in a wave and thats not very appealing).
-
Shadow Wave Spawn 1
-
Events
-
Time - ShadowWaveTimer[1] expires
-
-
Conditions
-
(Percentage mana of Worker[1]) Less than or equal to 20.00
-
-
Actions
-
Set ShadowWorkerPoint[1] = (Position of Worker[1])
-
For each (Integer A) from 1 to AmountOfShadows[ShadowLevels[1]], do (Actions)
-
Loop - Actions
-
Unit - Create 1 ShadowUnits[ShadowLevels[1]] for Neutral Hostile at (ShadowWorkerPoint[1] offset by ((Random real number between 600.00 and 1000.00), (Random angle))) facing Default building facing degrees
-
Unit - Turn collision for (Last created unit) Off
-
Set ShadowSumLoc = (Position of (Last created unit))
-
Special Effect - Create a special effect at ShadowSumLoc using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
-
Special Effect - Destroy (Last created special effect)
-
AI - Ignore (Last created unit)'s guard position
-
Unit - Order (Last created unit) to Attack-Move To ShadowWorkerPoint[1]
-
Unit Group - Add (Last created unit) to ShadowTempGroup[1]
-
-
-
Custom script: call RemoveLocation (udg_ShadowSumLoc)
-
Custom script: call RemoveLocation (udg_ShadowWorkerPoint[1])
-
-
-
Shadow Wave Reset 1
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Dying unit) is in ShadowTempGroup[1]) Equal to True
-
Or - Any (Conditions) are true
-
Conditions
-
-
-
Actions
-
Unit Group - Remove (Dying unit) from ShadowTempGroup[1]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in ShadowTempGroup[1]) Equal to 0
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Percentage mana of Worker[1]) Less than or equal to 20.00
-
-
Then - Actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShadowLevels[1] Less than 7
-
-
Then - Actions
-
Set ShadowLevels[1] = (ShadowLevels[1] + 1)
-
Set ShadowWaveDice[1] = (Random real number between 15.00 and 30.00)
-
Countdown Timer - Start ShadowWaveTimer[1] as a One-shot timer that will expire in ShadowWaveDice[1] seconds
-
-
Else - Actions
-
Set ShadowWaveDice[1] = (Random real number between 15.00 and 30.00)
-
Countdown Timer - Start ShadowWaveTimer[1] as a One-shot timer that will expire in ShadowWaveDice[1] seconds
-
-
-
-
-
-
Else - Actions
-
-
-
The only one who got insane is me now pls help...
Thanks so much for helping.
Last edited: