Ultimate nature protection
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Ultimate nature protection
Actions
[B]Set UltimateNatureCounter = 0[/B]
Set UltimateNatureProtCaster = (Casting unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
For each (Integer A) from 0 to 7, do (Actions)
Loop - Actions
Set UltimateOffset = ((Position of UltimateNatureProtCaster) offset by 100.00 towards (45.00 x (Real((Integer A)))) degrees)
[B] Set UltimateNatureCounter = (UltimateNatureCounter + 1)[/B]
[B] Destructible - Create a Summer Tree Wall at UltimateOffset[/B] facing (Random angle) with scale 1.00 and variation 0
[B] Set UltimateNatureTree[UltimateNatureCounter] = (Last created destructible)[/B]
Animation - Play (Last created destructible)'s birth animation
Custom script: call RemoveLocation (udg_UltimateOffset)
Unit - Add a ((Real((Level of Ultimate nature protection for (Casting unit)))) x 2.00) second Generic expiration timer to (Last created unit)
Unit - Add Life Regeneration Aura (Neutral) to UltimateNatureProtCaster
Unit - Add Mana Regeneration (Neutral) to UltimateNatureProtCaster
Special Effect - Create a special effect attached to the overhead of UltimateNatureProtCaster using Abilities\Spells\NightElf\Tranquility\TranquilityTarget.mdl
Set UltimateNatureProtSpec = (Last created special effect)
Wait ((Real((Level of Ultimate nature protection for UltimateNatureProtCaster))) x 2.00) seconds
[B]Destructible - Kill UltimateNatureTree[UltimateNatureCounter][/B]
Special Effect - Destroy UltimateNatureProtSpec
Unit - Remove Life Regeneration Aura (Neutral) from UltimateNatureProtCaster
Unit - Remove Mana Regeneration (Neutral) from UltimateNatureProtCaster
For each (Integer A) from 0 to 7, do (Actions)
Loop - Actions
Set UltimateOffset = ((Position of UltimateNatureProtCaster) offset by 100.00 towards (45.00 x (Real((Integer A)))) degrees)
Unit - Create 1 Treant for (Owner of UltimateNatureProtCaster) at UltimateOffset facing Default building facing degrees
Custom script: call RemoveLocation (udg_UltimateOffset)
Else - Actions
That's very clever...how do you think of things like this?Make something like this:
For each integer 1 to UltimateNatureCounter do actions
Kill - UltimateNatureTree[Integer A]
Well, arrays are pretty simple to figure out. Basically, a variable is like one square of information. If you make the variable an array, it can become a cube of information. What I mean by this is that when you just have a variable, you can only put one thing into it. But, if it's an array, it can hold multiple pieces of information as long as they're of the same type (integer arrays can't hold units, etc.) They're also useful for other things that I can't think of right now.Well I really suck at arrays, I barely know what they are and even less how to use them properly .
Destructible - Kill UltimateNatureTree[1]
Destructible - Kill UltimateNatureTree[2]
Are you using "For loop integer A" as array for the Tree variable?
Ultimate nature protection
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Ultimate nature protection
Actions
Set UltimateNatureCounter = 0
Set UltimateNatureProtCaster = (Casting unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
For each (Integer A) from 0 to 7, do (Actions)
Loop - Actions
Set UltimateOffset = ((Position of UltimateNatureProtCaster) offset by 100.00 towards (45.00 x (Real((Integer A)))) degrees)
Set UltimateNatureCounter = (UltimateNatureCounter + 1)
Destructible - Create a Summer Tree Wall at UltimateOffset facing (Random angle) with scale 1.00 and variation 0
Set UltimateNatureTree[UltimateNatureCounter] = (Last created destructible)
Animation - Play (Last created destructible)'s birth animation
Custom script: call RemoveLocation (udg_UltimateOffset)
Unit - Add a ((Real((Level of Ultimate nature protection for (Casting unit)))) x 2.00) second Generic expiration timer to (Last created unit)
Unit - Add Life Regeneration Aura (Neutral) to UltimateNatureProtCaster
Unit - Add Mana Regeneration (Neutral) to UltimateNatureProtCaster
Special Effect - Create a special effect attached to the overhead of UltimateNatureProtCaster using Abilities\Spells\NightElf\Tranquility\TranquilityTarget.mdl
Set UltimateNatureProtSpec = (Last created special effect)
Wait ((Real((Level of Ultimate nature protection for UltimateNatureProtCaster))) x 2.00) seconds
For each (Integer A) from 1 to UltimateNatureCounter, do (Actions)
Loop - Actions
Destructible - Kill UltimateNatureTree[UltimateNatureCounter]
Special Effect - Destroy UltimateNatureProtSpec
Unit - Remove Life Regeneration Aura (Neutral) from UltimateNatureProtCaster
Unit - Remove Mana Regeneration (Neutral) from UltimateNatureProtCaster
For each (Integer A) from 0 to 7, do (Actions)
Loop - Actions
Set UltimateOffset = ((Position of UltimateNatureProtCaster) offset by 100.00 towards (45.00 x (Real((Integer A)))) degrees)
Unit - Create 1 Treant for (Owner of UltimateNatureProtCaster) at UltimateOffset facing Default building facing degrees
Custom script: call RemoveLocation (udg_UltimateOffset)
Else - Actions
The stuff in bold needs to be Integer A, and not what you have it as.Code:Ultimate nature protection Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Ultimate nature protection Actions Set UltimateNatureCounter = 0 Set UltimateNatureProtCaster = (Casting unit) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Then - Actions For each (Integer A) from 0 to 7, do (Actions) Loop - Actions Set UltimateOffset = ((Position of UltimateNatureProtCaster) offset by 100.00 towards (45.00 x (Real((Integer A)))) degrees) Set UltimateNatureCounter = (UltimateNatureCounter + 1) Destructible - Create a Summer Tree Wall at UltimateOffset facing (Random angle) with scale 1.00 and variation 0 Set UltimateNatureTree[[B]UltimateNatureCounter[/B]] = (Last created destructible) Animation - Play (Last created destructible)'s birth animation Custom script: call RemoveLocation (udg_UltimateOffset) Unit - Add a ((Real((Level of Ultimate nature protection for (Casting unit)))) x 2.00) second Generic expiration timer to (Last created unit) Unit - Add Life Regeneration Aura (Neutral) to UltimateNatureProtCaster Unit - Add Mana Regeneration (Neutral) to UltimateNatureProtCaster Special Effect - Create a special effect attached to the overhead of UltimateNatureProtCaster using Abilities\Spells\NightElf\Tranquility\TranquilityTarget.mdl Set UltimateNatureProtSpec = (Last created special effect) Wait ((Real((Level of Ultimate nature protection for UltimateNatureProtCaster))) x 2.00) seconds For each (Integer A) from 1 to UltimateNatureCounter, do (Actions) Loop - Actions Destructible - Kill UltimateNatureTree[[B]UltimateNatureCounter[/B]] Special Effect - Destroy UltimateNatureProtSpec Unit - Remove Life Regeneration Aura (Neutral) from UltimateNatureProtCaster Unit - Remove Mana Regeneration (Neutral) from UltimateNatureProtCaster For each (Integer A) from 0 to 7, do (Actions) Loop - Actions Set UltimateOffset = ((Position of UltimateNatureProtCaster) offset by 100.00 towards (45.00 x (Real((Integer A)))) degrees) Unit - Create 1 Treant for (Owner of UltimateNatureProtCaster) at UltimateOffset facing Default building facing degrees Custom script: call RemoveLocation (udg_UltimateOffset) Else - Actions
Code:Ultimate nature protection Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Ultimate nature protection Actions Set UltimateNatureCounter = 0 Set UltimateNatureProtCaster = (Casting unit) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Then - Actions For each (Integer A) from 0 to 7, do (Actions) Loop - Actions Set UltimateOffset = ((Position of UltimateNatureProtCaster) offset by 100.00 towards (45.00 x (Real((Integer A)))) degrees) Set UltimateNatureCounter = (UltimateNatureCounter + 1) Destructible - Create a Summer Tree Wall at UltimateOffset facing (Random angle) with scale 1.00 and variation 0 Set UltimateNatureTree[UltimateNatureCounter] = (Last created destructible) Animation - Play (Last created destructible)'s birth animation Custom script: call RemoveLocation (udg_UltimateOffset) Unit - Add a ((Real((Level of Ultimate nature protection for (Casting unit)))) x 2.00) second Generic expiration timer to (Last created unit) Unit - Add Life Regeneration Aura (Neutral) to UltimateNatureProtCaster Unit - Add Mana Regeneration (Neutral) to UltimateNatureProtCaster Special Effect - Create a special effect attached to the overhead of UltimateNatureProtCaster using Abilities\Spells\NightElf\Tranquility\TranquilityTarget.mdl Set UltimateNatureProtSpec = (Last created special effect) Wait ((Real((Level of Ultimate nature protection for UltimateNatureProtCaster))) x 2.00) seconds For each (Integer A) from 1 to UltimateNatureCounter, do (Actions) Loop - Actions [B] Destructible - Kill UltimateNatureTree[UltimateNatureCounter][/B] Special Effect - Destroy UltimateNatureProtSpec Unit - Remove Life Regeneration Aura (Neutral) from UltimateNatureProtCaster Unit - Remove Mana Regeneration (Neutral) from UltimateNatureProtCaster For each (Integer A) from 0 to 7, do (Actions) Loop - Actions Set UltimateOffset = ((Position of UltimateNatureProtCaster) offset by 100.00 towards (45.00 x (Real((Integer A)))) degrees) Unit - Create 1 Treant for (Owner of UltimateNatureProtCaster) at UltimateOffset facing Default building facing degrees Custom script: call RemoveLocation (udg_UltimateOffset) Else - Actions
The stuff in bold needs to be Integer A, and not what you have it as.
P.S. to Kazuga: Reply to my PM, if you don't mind
Hehe... I try to be as efficient as possible without wasting time. You should be able to find Integer A, although it might appear as For Loop Integer A or something like that.:nuts:Hm, can't find "Integer A"...
>P.S. to Kazuga: Reply to my PM, if you don't mind
As Larcenit said, you sure are fast^^ I don't get time enough to read the first pm before you send me another one .