So after looking more into leaks I decided to start coding in something to clean my triggers. I do not know JASS so I am trying to figure it out as I go. Here is my trigger so far and all I am trying to do is clean locations.
Oh and side note, the reason I am using this system of player number nonsense is so when different players cast the same spell at different points I don't want the variables getting mixed up if the code has a wait in it. Anyone looking probably already knows that but I just wanted to ask if anyone knew of a better system so that maybe I wouldn't have to use these wild indexes. Thanks again!
[Edit]-found the problem was just a ) at the end haha oh well but now I want to know if anyone has any better ideas for labeling these abilities points. Also I am having a problem with the terrain change in this, it does not seem to be running at all. I get the dummy that spawns at the point but that is it. No terrain.
[Edit] I may be getting into my own head about this stuff but my map spawns a lot of units continuously so for a trigger like this
-
Holy Used
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Holy Land
-
-
Actions
-
Set Point[((Player number of (Owner of (Triggering unit))) - 1)] = (Target point of ability being cast)
-
Set CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)] = (Casting unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Holy Land for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]) Equal to 1
-
-
Then - Actions
-
Set Area[(2 + (Player number of (Owner of (Triggering unit))))] = 350.00
-
Set Damage[((Player number of (Owner of (Triggering unit))) - 1)] = 10
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Holy Land for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]) Equal to 2
-
-
Then - Actions
-
Set Area[(2 + (Player number of (Owner of (Triggering unit))))] = 450.00
-
Set Damage[((Player number of (Owner of (Triggering unit))) - 1)] = 15
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Holy Land for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]) Equal to 3
-
-
Then - Actions
-
Set Area[(2 + (Player number of (Owner of (Triggering unit))))] = 550.00
-
Set Damage[((Player number of (Owner of (Triggering unit))) - 1)] = 20
-
-
Else - Actions
-
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Casting unit) has buff Divine Shield) Equal to True
-
-
Then - Actions
-
For each (Integer A) from 1 to 4, do (Actions)
-
Loop - Actions
-
Unit - Create 1 Footman for (Owner of (Triggering unit)) at (Point[((Player number of (Owner of (Triggering unit))) - 1)] offset by 100.00 towards (45.00 + (90.00 x ((Real((Integer A))) - 1.00))) degrees) facing Default building facing degrees
-
Special Effect - Create a special effect attached to the overhead of (Last created unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
-
-
-
-
Else - Actions
-
Do nothing
-
-
-
Environment - Change terrain type at Point[((Player number of (Owner of (Triggering unit))) - 1)] to Ashenvale - Grass Cliff using variation -1 in an area of size ((Integer(Area[2])) / 100) and shape Circle
-
Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at (Center of Holy Land Thing <gen>) facing Default building facing degrees
-
Wait 0.01 seconds
-
Unit - Remove (Last created unit) from the game
-
Environment - Create at (Region centered at Point[((Player number of (Owner of (Triggering unit))) - 1)] with size (Area[(2 + (Player number of (Owner of (Triggering unit))))], Area[(2 + (Player number of (Owner of (Triggering unit))))])) the weather effect Rays Of Light
-
Environment - Turn (Last created weather effect) On
-
Unit - Remove Devotion Aura from (Triggering unit)
-
Unit - Set the custom value of Unit to 4
-
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[((Player number of (Owner of (Triggering unit))) - 1)] facing Default building facing degrees
-
Set CreatedUnit[62] = (Last created unit)
-
Unit - Set level of Holy Land Buff for CreatedUnit[62] to (Level of Holy Land for CreatedUnit[((Player number of (Owner of (Triggering unit))) + 100)])
-
Wait 20.00 seconds
-
Unit - Remove CreatedUnit[62] from the game
-
Trigger - Turn off Holy Land Regen <gen>
-
Environment - Remove (Last created weather effect)
-
Environment - Change terrain type at Point[((Player number of (Owner of (Triggering unit))) - 1)] to Cityscape - Grass Trim using variation -1 in an area of size ((Integer(Area[2])) / 100) and shape Circle
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit has buff Divine Shield) Equal to True
-
-
Then - Actions
-
Unit - Add Devotion Aura to CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]
-
Unit - Set level of Devotion Aura for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)] to 4
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Holy Land for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]) Equal to 1
-
-
Then - Actions
-
Unit - Add Devotion Aura to CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]
-
Unit - Set level of Devotion Aura for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)] to 1
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Holy Land for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]) Equal to 2
-
-
Then - Actions
-
Unit - Add Devotion Aura to CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]
-
Unit - Set level of Devotion Aura for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)] to 2
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Holy Land for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]) Equal to 3
-
-
Then - Actions
-
Unit - Add Devotion Aura to CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)]
-
Unit - Set level of Devotion Aura for CreatedUnit2[((Player number of (Owner of (Triggering unit))) + 100)] to 3
-
-
Else - Actions
-
-
-
-
-
-
-
-
Custom script: call RemoveLocation(udg_Point[( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))-1)]
-
-
Oh and side note, the reason I am using this system of player number nonsense is so when different players cast the same spell at different points I don't want the variables getting mixed up if the code has a wait in it. Anyone looking probably already knows that but I just wanted to ask if anyone knew of a better system so that maybe I wouldn't have to use these wild indexes. Thanks again!
[Edit]-found the problem was just a ) at the end haha oh well but now I want to know if anyone has any better ideas for labeling these abilities points. Also I am having a problem with the terrain change in this, it does not seem to be running at all. I get the dummy that spawns at the point but that is it. No terrain.
[Edit] I may be getting into my own head about this stuff but my map spawns a lot of units continuously so for a trigger like this
-
Unit - Create 1 Footman for (Owner of (Triggering unit)) at (Point[((Player number of (Owner of (Triggering unit))) - 1)] offset by 100.00 towards (45.00 + (90.00 x ((Real((Integer A))) - 1.00))) degrees) facing Default building facing degrees
Last edited: