- Joined
- Jun 20, 2017
- Messages
- 380
Hello, I have 3 problems with this system!
1. As you can see in the picture below, the gird is not centerd! I want those marked areas in the image not to be counted(white one).
2. When I upgraded the range of my tower, its upgrade is not added to it! therefore, its range does not change!
3. If I turn off the Check Tower Range trigger, the Check Aura Range will work! same thing work opposite! (I guess I'll have to create another channel ability for the other one!).
Also tell/point me if there is something unnecessary I should remove! to summarize the trigger.
1. As you can see in the picture below, the gird is not centerd! I want those marked areas in the image not to be counted(white one).
2. When I upgraded the range of my tower, its upgrade is not added to it! therefore, its range does not change!
3. If I turn off the Check Tower Range trigger, the Check Aura Range will work! same thing work opposite! (I guess I'll have to create another channel ability for the other one!).
Also tell/point me if there is something unnecessary I should remove! to summarize the trigger.
-
Check Tower Range
-
Events
-
Unit - A unit Is issued an order with no target
-
-
Conditions
-
(Issued order) Equal to (Order(submerge))
-
(Level of Grid (On - Self) for (Ordered unit)) Equal to 1
-
-
Actions
-
Set VariableSet TriggeringUnit = (Triggering unit)
-
Set VariableSet Point_TowerRange = (Position of TriggeringUnit)
-
Set VariableSet Integer_TowerRangeIndex = (Integer_TowerRangeIndex + 1)
-
Set VariableSet Integer_TowerRangeUpgrade = (Current research level of Long Rifles[custom] for (Owner of TriggeringUnit))
-
Set VariableSet GridNumber = (Player number of (Owner of (Ordered unit)))
-
Set VariableSet GridHost[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
-
-------- --------
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units owned by (Player(GridNumber)).) and do (Actions)
-
Loop - Actions
-
Unit - Set level of Grid (On - Self) for (Picked unit) to 2
-
Unit - Set level of Grid (On - Target) for (Picked unit) to 2
-
Unit - Set level of Grid (Off) for (Picked unit) to 2
-
-
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of TriggeringUnit) Equal to Guard Tower
-
-
Then - Actions
-
-------- Add the TowerRangeSize + CollisionSize for efficiency --------
-
Set VariableSet Reals_TowerRangeSize[Integer_TowerRangeIndex] = 400.00
-
Set VariableSet Reals_CollisionSize[Integer_TowerRangeIndex] = 72.00
-
Set VariableSet Real_TotalTowerRange = ((Reals_TowerRangeSize[Integer_TowerRangeIndex] + Reals_CollisionSize[Integer_TowerRangeIndex]) + (Real(Integer_TowerRangeUpgrade)))
-
-------- --------
-
Unit - Create 1 Check Range [Dummy] for (Owner of TriggeringUnit) at Point_TowerRange facing Default building facing degrees
-
Set VariableSet LastCreatedUnit = (Last created unit)
-
Animation - Change LastCreatedUnit's size to ((Real_TotalTowerRange x 2.00)%, (Real_TotalTowerRange x 2.00)%, 100.00%) of its original size
-
-
Else - Actions
-
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of TriggeringUnit) Equal to Cannon Tower
-
-
Then - Actions
-
-------- Add the TowerRangeSize + CollisionSize for efficiency --------
-
Set VariableSet Reals_TowerRangeSize[Integer_TowerRangeIndex] = 600.00
-
Set VariableSet Reals_CollisionSize[Integer_TowerRangeIndex] = 72.00
-
Set VariableSet Real_TotalTowerRange = ((Reals_TowerRangeSize[Integer_TowerRangeIndex] + Reals_CollisionSize[Integer_TowerRangeIndex]) + (Real(Integer_TowerRangeUpgrade)))
-
-------- --------
-
Unit - Create 1 Check Range [Dummy] for (Owner of TriggeringUnit) at Point_TowerRange facing Default building facing degrees
-
Set VariableSet LastCreatedUnit = (Last created unit)
-
Animation - Change LastCreatedUnit's size to ((Real_TotalTowerRange x 2.00)%, (Real_TotalTowerRange x 2.00)%, 100.00%) of its original size
-
-
Else - Actions
-
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of TriggeringUnit) Equal to Arcane Tower
-
-
Then - Actions
-
-------- Add the TowerRangeSize + CollisionSize for efficiency --------
-
Set VariableSet Reals_TowerRangeSize[Integer_TowerRangeIndex] = 800.00
-
Set VariableSet Reals_CollisionSize[Integer_TowerRangeIndex] = 72.00
-
Set VariableSet Real_TotalTowerRange = ((Reals_TowerRangeSize[Integer_TowerRangeIndex] + Reals_CollisionSize[Integer_TowerRangeIndex]) + (Real(Integer_TowerRangeUpgrade)))
-
-------- --------
-
Unit - Create 1 Check Range [Dummy] for (Owner of TriggeringUnit) at Point_TowerRange facing Default building facing degrees
-
Set VariableSet LastCreatedUnit = (Last created unit)
-
Animation - Change LastCreatedUnit's size to ((Real_TotalTowerRange x 2.00)%, (Real_TotalTowerRange x 2.00)%, 100.00%) of its original size
-
-
Else - Actions
-
-
-------- --------
-
Custom script: call RemoveLocation(udg_Point_TowerRange)
-
-
-
Tower Range Upgrade
-
Events
-
Unit - A unit Finishes research
-
-
Conditions
-
(Researched tech-type) Equal to Long Rifles[custom]
-
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) 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 - Set (Picked unit) acquisition range to ((Current acquisition range of (Picked unit)) + (Real((Current research level of Long Rifles[custom] for (Owner of (Picked unit))))))
-
Animation - Change LastCreatedUnit's size to ((((Current acquisition range of (Picked unit)) + ((Collision Size of (Picked unit)) + (Real((Current research level of Long Rifles[custom] for (Owner of (Picked unit))))))) x 2.00)%, (((Current acquisition range of (Picked unit)) + ((Collision Size of (Picked unit)) + (Real((Current research level of Long Rifles[custom] for (Owner of (Picked unit))))))) x 2.00)%, 100.00%) of its original size
-
-
Else - Actions
-
-
-
-
-
-
Check Aura Range
-
Events
-
Unit - A unit Is issued an order with no target
-
-
Conditions
-
(Issued order) Equal to (Order(submerge))
-
(Level of Grid (On - Self) for (Ordered unit)) Equal to 1
-
-
Actions
-
Set VariableSet TriggeringUnit = (Triggering unit)
-
Set VariableSet Point_AuraRange = (Position of TriggeringUnit)
-
Set VariableSet Integer_AuraRangeIndex = (Integer_AuraRangeIndex + 1)
-
Set VariableSet GridNumber = (Player number of (Owner of (Ordered unit)))
-
Set VariableSet GridHost[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
-
-------- --------
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units owned by (Player(GridNumber)).) and do (Actions)
-
Loop - Actions
-
Unit - Set level of Grid (On - Self) for (Picked unit) to 2
-
Unit - Set level of Grid (On - Target) for (Picked unit) to 2
-
Unit - Set level of Grid (Off) for (Picked unit) to 2
-
-
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Devotion Aura [Custom] for TriggeringUnit) Equal to 1
-
-
Then - Actions
-
-------- Add the AuraRangeSize for efficiency --------
-
Set VariableSet Reals_AuraRangeSize[Integer_AuraRangeIndex] = 300.00
-
Set VariableSet Real_TotalAuraRange = (Reals_AuraRangeSize[Integer_AuraRangeIndex] x 2.00)
-
-------- --------
-
Unit - Create 1 Check Range [Dummy] for (Owner of TriggeringUnit) at Point_AuraRange facing Default building facing degrees
-
Set VariableSet LastCreatedUnit = (Last created unit)
-
Animation - Change LastCreatedUnit's size to (Real_TotalAuraRange%, Real_TotalAuraRange%, 100.00%) of its original size
-
Animation - Change LastCreatedUnit's vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
-
-
Else - Actions
-
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Devotion Aura [Custom] for TriggeringUnit) Equal to 2
-
-
Then - Actions
-
-------- Add the AuraRangeSize for efficiency --------
-
Set VariableSet Reals_AuraRangeSize[Integer_AuraRangeIndex] = 500.00
-
Set VariableSet Real_TotalAuraRange = (Reals_AuraRangeSize[Integer_AuraRangeIndex] x 2.00)
-
-------- --------
-
Unit - Create 1 Check Range [Dummy] for (Owner of TriggeringUnit) at Point_AuraRange facing Default building facing degrees
-
Set VariableSet LastCreatedUnit = (Last created unit)
-
Animation - Change LastCreatedUnit's size to (Real_TotalAuraRange%, Real_TotalAuraRange%, 100.00%) of its original size
-
Animation - Change LastCreatedUnit's vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
-
-
Else - Actions
-
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Devotion Aura [Custom] for TriggeringUnit) Equal to 3
-
-
Then - Actions
-
-------- Add the AuraRangeSize for efficiency --------
-
Set VariableSet Reals_AuraRangeSize[Integer_AuraRangeIndex] = 700.00
-
Set VariableSet Real_TotalAuraRange = (Reals_AuraRangeSize[Integer_AuraRangeIndex] x 2.00)
-
-------- --------
-
Unit - Create 1 Check Range [Dummy] for (Owner of TriggeringUnit) at Point_AuraRange facing Default building facing degrees
-
Set VariableSet LastCreatedUnit = (Last created unit)
-
Animation - Change LastCreatedUnit's size to (Real_TotalAuraRange%, Real_TotalAuraRange%, 100.00%) of its original size
-
Animation - Change LastCreatedUnit's vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
-
-
Else - Actions
-
-
-------- --------
-
Custom script: call RemoveLocation(udg_Point_AuraRange)
-
-
-
GridInit
-
Events
-
Time - Elapsed game time is 0.50 seconds
-
-
Conditions
-
Actions
-
-------- Color choices% (Red, Green, Blue, Opacity) --------
-
-------- Buildable (White - GridColorPathBuildable) --------
-
Set VariableSet GridColorR[0] = 100.00
-
Set VariableSet GridColorG[0] = 100.00
-
Set VariableSet GridColorB[0] = 100.00
-
Set VariableSet GridColorO[0] = 0.00
-
-------- --------
-
-------- Unbuildable (Red - GridColorPathUnbuildable) --------
-
Set VariableSet GridColorR[1] = 100.00
-
Set VariableSet GridColorG[1] = 0.00
-
Set VariableSet GridColorB[1] = 0.00
-
Set VariableSet GridColorO[1] = 0.00
-
-------- --------
-
-------- Shallow water (Cyan - GridColorPathShallow) --------
-
Set VariableSet GridColorR[2] = 0.00
-
Set VariableSet GridColorG[2] = 100.00
-
Set VariableSet GridColorB[2] = 100.00
-
Set VariableSet GridColorO[2] = 0.00
-
-------- --------
-
-------- Deep water (Purple - GridColorPathDeep) --------
-
Set VariableSet GridColorR[3] = 100.00
-
Set VariableSet GridColorG[3] = 0.00
-
Set VariableSet GridColorB[3] = 100.00
-
Set VariableSet GridColorO[3] = 0.00
-
-------- --------
-
-------- Color picker (0-5 choosing from above defined colors) --------
-
Set VariableSet GridColorPathBuildable = 0
-
Set VariableSet GridColorPathUnbuildable = 1
-
Set VariableSet GridColorPathShallow = 2
-
Set VariableSet GridColorPathDeep = 3
-
-------- End of color section --------
-
-------- --------
-
Set VariableSet GridMaxPlayer = 24
-
Set VariableSet GridMaxSizeX = 8
-
Set VariableSet GridMaxSizeY = 8
-
Set VariableSet GridRectSize = (GridMaxSizeX x GridMaxSizeY)
-
Set VariableSet GridPos = (Center of (Playable map area))
-
-------- --------
-
Hashtable - Create a hashtable
-
Set VariableSet GridImagesHash = (Last created hashtable)
-
-------- --------
-
For each (Integer GridNumber) from 1 to GridMaxPlayer, do (Actions)
-
Loop - Actions
-
Set VariableSet GridSubPos = (GridPos offset by ((0.00 - ((X of GridSubPos) mod 128.00)), (0.00 - ((Y of GridSubPos) mod 128.00))))
-
-------- --------
-
For each (Integer GridHashLoop) from 0 to (GridRectSize - 1), do (Actions)
-
Loop - Actions
-
Set VariableSet GridCoorX = ((GridHashLoop mod GridMaxSizeX) - (GridMaxSizeX / 2))
-
Set VariableSet GridCoorY = (((GridHashLoop - (GridHashLoop mod GridMaxSizeX)) / GridMaxSizeX) - (GridMaxSizeY / 2))
-
Set VariableSet GridPos = (GridSubPos offset by ((128.00 x (Real(GridCoorX))), (128.00 x (Real(GridCoorY)))))
-
-------- --------
-
Image - Create an image using war3mapImported\Grid64.blp of size 128.00 at GridPos with Z offset 0.00 using image type Occlusion Mark
-
Hashtable - Save Handle Of(Last created image) as GridNumber of GridHashLoop in GridImagesHash.
-
Image - Change (Load GridNumber of GridHashLoop in GridImagesHash.): Enable render always state
-
Image - Hide (Load GridNumber of GridHashLoop in GridImagesHash.)
-
-------- --------
-
Custom script: call RemoveLocation(udg_GridPos)
-
-
-
-------- --------
-
Custom script: call RemoveLocation(udg_GridSubPos)
-
-
-
-------- --------
-
Custom script: call RemoveLocation(udg_GridPos)
-
-
-
GridOnPoint
-
Events
-
Unit - A unit Is issued an order targeting a point
-
-
Conditions
-
(Issued order) Equal to (Order(submerge))
-
(Level of Grid (On - Target) for (Ordered unit)) Equal to 1
-
-
Actions
-
Set VariableSet GridNumber = (Player number of (Owner of (Ordered unit)))
-
Set VariableSet GridHost[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
-
-------- --------
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units owned by (Player(GridNumber)).) and do (Actions)
-
Loop - Actions
-
Unit - Set level of Grid (On - Target) for (Picked unit) to 2
-
Unit - Set level of Grid (On - Self) for (Picked unit) to 2
-
Unit - Set level of Grid (Off) for (Picked unit) to 2
-
-
-
-------- --------
-
Set VariableSet GridPos = (Target point of issued order)
-
Set VariableSet GridSubPos = (GridPos offset by ((0.00 - ((X of GridPos) mod 128.00)), (0.00 - ((Y of GridPos) mod 128.00))))
-
-------- --------
-
For each (Integer GridHashLoop) from 0 to (GridRectSize - 1), do (Actions)
-
Loop - Actions
-
Set VariableSet GridCoorX = ((GridHashLoop mod GridMaxSizeX) - (GridMaxSizeX / 2))
-
Set VariableSet GridCoorY = (((GridHashLoop - (GridHashLoop mod GridMaxSizeX)) / GridMaxSizeX) - (GridMaxSizeY / 2))
-
Set VariableSet GridPos = (GridSubPos offset by ((128.00 x (Real(GridCoorX))), (128.00 x (Real(GridCoorY)))))
-
-------- --------
-
Image - Change the position of (Load GridNumber of GridHashLoop in GridImagesHash.) to GridPos with Z offset 0.00
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Terrain pathing at GridPos of type Buildability is off) Equal to False
-
-
Then - Actions
-
Set VariableSet GridColorIndex = GridColorPathBuildable
-
-
Else - Actions
-
Set VariableSet GridColorIndex = GridColorPathUnbuildable
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Terrain pathing at GridPos of type Floatability is off) Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Terrain pathing at GridPos of type Walkability is off) Equal to False
-
-
Then - Actions
-
Set VariableSet GridColorIndex = GridColorPathShallow
-
-
Else - Actions
-
Set VariableSet GridColorIndex = GridColorPathDeep
-
-
-
-
Else - Actions
-
-
-
-
-------- --------
-
Image - Change the color of (Load GridNumber of GridHashLoop in GridImagesHash.) to (GridColorR[GridColorIndex]%, GridColorG[GridColorIndex]%, GridColorB[GridColorIndex]%) with GridColorO[GridColorIndex]% transparency
-
Image - Change the position of (Load GridNumber of GridHashLoop in GridImagesHash.) to GridPos with Z offset 0.00
-
Image - Change (Load GridNumber of GridHashLoop in GridImagesHash.): Enable render always state
-
Image - Show (Load GridNumber of GridHashLoop in GridImagesHash.)
-
-------- --------
-
Custom script: call RemoveLocation(udg_GridPos)
-
-
-
-------- --------
-
Custom script: call RemoveLocation(udg_GridPos)
-
Custom script: call RemoveLocation(udg_GridSubPos)
-
-
-
GridOff
-
Events
-
Unit - A unit Is issued an order with no target
-
-
Conditions
-
(Issued order) Equal to (Order(unsubmerge))
-
(Level of Grid (Off) for (Ordered unit)) Equal to 2
-
-
Actions
-
Set VariableSet GridNumber = (Player number of (Owner of (Ordered unit)))
-
-------- --------
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units owned by (Player(GridNumber)).) and do (Actions)
-
Loop - Actions
-
Unit - Set level of Grid (On - Target) for (Picked unit) to 1
-
Unit - Set level of Grid (On - Self) for (Picked unit) to 1
-
Unit - Set level of Grid (Off) for (Picked unit) to 1
-
-
-
-------- --------
-
For each (Integer GridHashLoop) from 0 to (GridRectSize - 1), do (Actions)
-
Loop - Actions
-
Image - Hide (Load GridNumber of GridHashLoop in GridImagesHash.)
-
-
-
-------- --------
-
Unit - Kill LastCreatedUnit
-
Unit - Remove LastCreatedUnit from the game
-
-
-
GridHostDies
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Dying unit) Equal to GridHost[(Player number of (Owner of (Dying unit)))]
-
-
Actions
-
Set VariableSet GridNumber = (Player number of (Owner of (Dying unit)))
-
-------- --------
-
Custom script: call RemoveLocation(udg_GridHostPos[udg_GridNumber])
-
-------- --------
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units owned by (Player(GridNumber)).) and do (Actions)
-
Loop - Actions
-
Unit - Set level of Grid (On - Target) for (Picked unit) to 1
-
Unit - Set level of Grid (On - Self) for (Picked unit) to 1
-
Unit - Set level of Grid (Off) for (Picked unit) to 1
-
-
-
-------- --------
-
For each (Integer GridHashLoop) from 0 to (GridRectSize - 1), do (Actions)
-
Loop - Actions
-
Image - Hide (Load GridNumber of GridHashLoop in GridImagesHash.)
-
-
-
-------- --------
-
Unit - Kill LastCreatedUnit
-
Unit - Remove LastCreatedUnit from the game
-
-------- --------
-
Set VariableSet GridIsOn[GridNumber] = False
-
-
Attachments
Last edited: