Hello,
I have an issue with my trigger. Somehow i can't update the range shown of a tower via an ability.
My goal is to :
1. If no long rifles tech researched then show current acquisition range whenever the ability is activated to show tower's range.
2. If long rifles tech researched thenb update the range of the tower and also update it with the ability effect.
Problem is, if i research level 1, then the range got completely messed up and it increases by, maybe 400 range and not 75 as i want. So the range shown via the ability is completely wrong. How can i fix that?
Also i have to use default acquisition range instead of current one to make the special effect work...why?
Here are screenshots of my issue:
No long rifles research works fine...
Long rifles level 1 with current range updating...
Long rifles level 2 with default range updating... range shown with special effect is wrong, the tower cannot reach the unit.
I have an issue with my trigger. Somehow i can't update the range shown of a tower via an ability.
My goal is to :
1. If no long rifles tech researched then show current acquisition range whenever the ability is activated to show tower's range.
2. If long rifles tech researched thenb update the range of the tower and also update it with the ability effect.
Problem is, if i research level 1, then the range got completely messed up and it increases by, maybe 400 range and not 75 as i want. So the range shown via the ability is completely wrong. How can i fix that?
Also i have to use default acquisition range instead of current one to make the special effect work...why?
Here are screenshots of my issue:
No long rifles research works fine...

Long rifles level 1 with current range updating...

Long rifles level 2 with default range updating... range shown with special effect is wrong, the tower cannot reach the unit.

-
Cast ability
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Show Range of Tower
-
-
Actions
-
Set VariableSet RangeCheck_UnitPos1 = (Position of (Triggering unit))
-
For each (Integer A) from 1 to 36, do (Actions)
-
Loop - Actions
-
Set VariableSet RangeCheck_UnitPos2 = (RangeCheck_UnitPos1 offset by (Current acquisition range of (Triggering unit)) towards ((Real((Integer A))) x 10.00) degrees.)
-
Special Effect - Create a special effect at RangeCheck_UnitPos2 using Objects\Spawnmodels\Other\IllidanFootprint\IllidanSpawnFootPrint0.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
-
-
Updating acquisition range
-
Events
-
Unit - A unit Finishes research
-
-
Conditions
-
(Researched tech-type) Equal to Long Rifles [|c00ffcc00Level 1|r]
-
-
Actions
-
Set VariableSet tempUnitGroup = (Units owned by (Owner of (Triggering unit)).)
-
Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)).) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Picked unit)) Equal to Arrow Tower 1
-
(Unit-type of (Picked unit)) Equal to Arrow Tower 2
-
(Unit-type of (Picked unit)) Equal to Arrow Tower 3
-
(Unit-type of (Picked unit)) Equal to Arrow Tower 3 (A HOTKEY ENTITY)
-
(Unit-type of (Picked unit)) Equal to Arrow Tower 4
-
(Unit-type of (Picked unit)) Equal to Arrow Tower 5
-
(Unit-type of (Picked unit)) Equal to Arrow Tower 6
-
(Unit-type of (Picked unit)) Equal to Arrow Tower 7
-
(Unit-type of (Picked unit)) Equal to Curse Tower 1
-
(Unit-type of (Picked unit)) Equal to Curse Tower 2
-
(Unit-type of (Picked unit)) Equal to Curse Tower 3
-
(Unit-type of (Picked unit)) Equal to Curse Tower 4
-
(Unit-type of (Picked unit)) Equal to Curse Tower 5
-
(Unit-type of (Picked unit)) Equal to Curse Tower 6
-
(Unit-type of (Picked unit)) Equal to Curse Tower 7
-
(Unit-type of (Picked unit)) Equal to P.O.I.S.O.N tower 1
-
(Unit-type of (Picked unit)) Equal to P.O.I.S.O.N tower 2
-
(Unit-type of (Picked unit)) Equal to P.O.I.S.O.N tower 3
-
(Unit-type of (Picked unit)) Equal to P.O.I.S.O.N tower 4
-
(Unit-type of (Picked unit)) Equal to P.O.I.S.O.N tower 5
-
(Unit-type of (Picked unit)) Equal to P.O.I.S.O.N tower 6
-
(Unit-type of (Picked unit)) Equal to P.O.I.S.O.N tower 7
-
(Unit-type of (Picked unit)) Equal to Range Tower 1
-
(Unit-type of (Picked unit)) Equal to Range Tower 2
-
(Unit-type of (Picked unit)) Equal to Range Tower 2 (D HOTKEY ENTITY)
-
(Unit-type of (Picked unit)) Equal to Range Tower 3
-
(Unit-type of (Picked unit)) Equal to Range Tower 4
-
(Unit-type of (Picked unit)) Equal to Range Tower 5
-
(Unit-type of (Picked unit)) Equal to Range Tower 6
-
(Unit-type of (Picked unit)) Equal to Range Tower 7
-
(Unit-type of (Picked unit)) Equal to Spectral Tower 1
-
(Unit-type of (Picked unit)) Equal to Spectral Tower 2
-
(Unit-type of (Picked unit)) Equal to Spectral Tower 3
-
(Unit-type of (Picked unit)) Equal to Spectral Tower 4
-
(Unit-type of (Picked unit)) Equal to Spectral Tower 5
-
(Unit-type of (Picked unit)) Equal to Spectral Tower 6
-
(Unit-type of (Picked unit)) Equal to Spectral Tower 7
-
-
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of Long Rifles [|c00ffcc00Level 1|r] for (Owner of (Triggering unit))) Equal to 1
-
-
Then - Actions
-
Unit - Set (Picked unit) acquisition range to ((Current acquisition range of (Triggering unit)) + 75.00)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of Long Rifles [|c00ffcc00Level 1|r] for (Owner of (Triggering unit))) Equal to 2
-
-
Then - Actions
-
Unit - Set (Picked unit) acquisition range to ((Default acquisition range of (Triggering unit)) + 150.00)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of Long Rifles [|c00ffcc00Level 1|r] for (Owner of (Triggering unit))) Equal to 3
-
-
Then - Actions
-
Unit - Set (Picked unit) acquisition range to ((Default acquisition range of (Triggering unit)) + 225.00)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of Long Rifles [|c00ffcc00Level 1|r] for (Owner of (Triggering unit))) Equal to 4
-
-
Then - Actions
-
Unit - Set (Picked unit) acquisition range to ((Default acquisition range of (Triggering unit)) + 300.00)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of Long Rifles [|c00ffcc00Level 1|r] for (Owner of (Triggering unit))) Equal to 5
-
-
Then - Actions
-
Unit - Set (Picked unit) acquisition range to ((Default acquisition range of (Triggering unit)) + 375.00)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup ( udg_tempUnitGroup )
-
-
Last edited: