alright so here's what i got. i have a ward ability. like serpent wards. i made them have a lighting attack gfx like on the lighting orb. but i also have an ability like the tinker's engineering upgrade. that ability effects the serpent ward ability. every level of the "engineering upgrade" increases the amount of "extra" serpent wards that attack to get the "effect" of a barrage. (reason being, so i can have the units attack with purge to fight against summoned units. basically the ward is a barrage type anti summoned unit ward)......anyways.... so yea.... i need help with custom values. I am able to give a custom value to the REAL serpent ward being put down through triggers. but when the real serpent ward dies i cant get rid of all 1-9 extra dummy serpent wards.
so i guess what im saying is this, if i loop a integer+1 for my REAL serpent ward. then have a for each integer a from 1-level of ability and spawn extra dummy units for that corresponding serpent ward. how do i remove them all.
this is what my trigger looks like.
FIRST TRY
so i guess what im saying is this, if i loop a integer+1 for my REAL serpent ward. then have a for each integer a from 1-level of ability and spawn extra dummy units for that corresponding serpent ward. how do i remove them all.
this is what my trigger looks like.
FIRST TRY
-
lightining ward
-
Events
- Unit - A unit Begins casting an ability
- Conditions
-
Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) lightining Ward (lvl 1)
-
Then - Actions
- Set point = (Target point of ability being cast)
- Unit - Create 1 lightning Ward (Dummy) for (Owner of (Triggering unit)) at point facing (Random angle) degrees
- Unit - Add a 40.00 second Generic expiration timer to (Last created unit)
- Custom script: call RemoveLocation (udg_point)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) lightining Ward (lvl 2)
-
Then - Actions
-
Set point = (Target point of ability being cast)
-
Do Multiple ActionsFor each (Integer A) from 1 to 2, do (Actions)
-
Loop - Actions
- Unit - Create 1 lightning Ward (Dummy) for (Owner of (Triggering unit)) at point facing (Random angle) degrees
- Unit - Add a 40.00 second Generic expiration timer to (Last created unit)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to 2, do (Actions)
- Custom script: call RemoveLocation (udg_point)
-
Set point = (Target point of ability being cast)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) lightining Ward (lvl 3)
-
Then - Actions
-
Set point = (Target point of ability being cast)
-
Do Multiple ActionsFor each (Integer A) from 1 to 3, do (Actions)
-
Loop - Actions
- Unit - Create 1 lightning Ward (Dummy) for (Owner of (Triggering unit)) at point facing (Random angle) degrees
- Unit - Add a 40.00 second Generic expiration timer to (Last created unit)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to 3, do (Actions)
- Custom script: call RemoveLocation (udg_point)
-
Set point = (Target point of ability being cast)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) lightining Ward (lvl 4)
-
Then - Actions
-
Set point = (Target point of ability being cast)
-
Do Multiple ActionsFor each (Integer A) from 1 to 4, do (Actions)
-
Loop - Actions
- Unit - Create 1 lightning Ward (Dummy) for (Owner of (Triggering unit)) at point facing (Random angle) degrees
- Unit - Add a 40.00 second Generic expiration timer to (Last created unit)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to 4, do (Actions)
- Custom script: call RemoveLocation (udg_point)
-
Set point = (Target point of ability being cast)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) lightining Ward (lvl 5)
-
Then - Actions
-
Set point = (Target point of ability being cast)
-
Do Multiple ActionsFor each (Integer A) from 1 to 5, do (Actions)
-
Loop - Actions
- Unit - Create 1 lightning Ward (Dummy) for (Owner of (Triggering unit)) at point facing (Random angle) degrees
- Unit - Add a 40.00 second Generic expiration timer to (Last created unit)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to 5, do (Actions)
- Custom script: call RemoveLocation (udg_point)
-
Set point = (Target point of ability being cast)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) lightining Ward (lvl 6)
-
Then - Actions
-
Set point = (Target point of ability being cast)
-
Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Unit - Create 1 lightning Ward (Dummy) for (Owner of (Triggering unit)) at point facing (Random angle) degrees
- Unit - Add a 40.00 second Generic expiration timer to (Last created unit)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
- Custom script: call RemoveLocation (udg_point)
-
Set point = (Target point of ability being cast)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) lightining Ward (lvl 7)
-
Then - Actions
-
Set point = (Target point of ability being cast)
-
Do Multiple ActionsFor each (Integer A) from 1 to 7, do (Actions)
-
Loop - Actions
- Unit - Create 1 lightning Ward (Dummy) for (Owner of (Triggering unit)) at point facing (Random angle) degrees
- Unit - Add a 40.00 second Generic expiration timer to (Last created unit)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to 7, do (Actions)
- Custom script: call RemoveLocation (udg_point)
-
Set point = (Target point of ability being cast)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) lightining Ward (lvl 8)
-
Then - Actions
-
Set point = (Target point of ability being cast)
-
Do Multiple ActionsFor each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
- Unit - Create 1 lightning Ward (Dummy) for (Owner of (Triggering unit)) at point facing (Random angle) degrees
- Unit - Add a 40.00 second Generic expiration timer to (Last created unit)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to 8, do (Actions)
- Custom script: call RemoveLocation (udg_point)
-
Set point = (Target point of ability being cast)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) lightining Ward (lvl 9)
-
Then - Actions
- Set Lighting_ward_integer = 0
- Set Lighting_ward_integer = (Lighting_ward_integer + 1)
- Set point = (Target point of ability being cast)
- Unit - Create 1 lightning Ward for (Owner of (Triggering unit)) at point facing Default building facing (270.0) degrees
- Unit - Set the custom value of (Last created unit) to Lighting_ward_integer
-
Set ward_array[Lighting_ward_integer] = (Last created unit)
-
Do Multiple ActionsFor each (Integer A) from 1 to 9, do (Actions)
-
Loop - Actions
- Set Lighting_dummy_integer = (Lighting_dummy_integer + 1)
- Unit - Create 1 lightning Ward (Dummy) for (Owner of (Triggering unit)) at point facing (Random angle) degrees
- Unit - Add a 40.00 second Generic expiration timer to (Last created unit)
- Unit - Set the custom value of (Last created unit) to Lighting_dummy_integer
- Set ward_dummy_array[Lighting_dummy_integer] = (Last created unit)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to 9, do (Actions)
- Custom script: call RemoveLocation (udg_point)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
lightining ward death Copy
-
Events
- Unit - A unit Dies
-
Conditions
- (Triggering unit) Equal to (==) ward_array[(Custom value of (Triggering unit))]
-
Actions
-
Do Multiple ActionsFor each (Integer Lighting_dummy_integer) from 1 to 10, do (Actions)
-
Loop - Actions
- Unit - Remove pylon_caster_array[(Custom value of (Triggering unit))] from the game
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer Lighting_dummy_integer) from 1 to 10, do (Actions)
-
Events