Im trying to make a hero which uses these stones (that he summons) to manipulate all his spells. What messes up is that it appears at the center of the map and not near the caster's location. Please Help.
Code:
And as the Summon Earth Follow trigger initially off.
And the Summon Earth Follow trigger doesnt make them follow.
Code:
Code:
Summon Earth Learn
Events
Unit - A unit Learns a skill
Conditions
(Unit-type of (Triggering unit)) Equal to Earth Caller
Actions
Set SE_Caster = (Casting unit)
Set SE_Earth_Amount = 0
Unit - Add Summon Earth to (Triggering unit)
Trigger - Turn off (This trigger)
Code:
Summon Earth
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Summon Earth
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SE_Earth_Amount Greater than or equal to 3
Then - Actions
Do nothing
Else - Actions
Set SE_CasterLoc = (Position of SE_Caster)
Unit - Create 1 Summon Earth dummy for (Owner of (Casting unit)) at (SE_CasterLoc offset by 100.00 towards (90.00 x (Real(SE_Earth_Amount))) degrees) facing Default building facing degrees
Set SE_Dummy[(SE_Earth_Amount + 1)] = (Last created unit)
Set SE_Earth_Amount = (SE_Earth_Amount + 1)
Custom script: call RemoveLocation(udg_SE_CasterLoc)
Trigger - Turn on Summon Earth Follow <gen>
Code:
Summon Earth Follow
Events
Time - Every 0.06 seconds of game time
Conditions
Actions
Set SE_CasterLoc = (Position of SE_Caster)
Unit - Move SE_Dummy[1] instantly to (SE_CasterLoc offset by 100.00 towards (1.00 x 90.00) degrees)
Special Effect - Create a special effect attached to the origin of SE_Dummy[1] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Special Effect - Destroy (Last created special effect)
Unit - Move SE_Dummy[1] instantly to (SE_CasterLoc offset by 100.00 towards (2.00 x 90.00) degrees)
Special Effect - Create a special effect attached to the origin of SE_Dummy[2] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Special Effect - Destroy (Last created special effect)
Unit - Move SE_Dummy[1] instantly to (SE_CasterLoc offset by 100.00 towards (3.00 x 90.00) degrees)
Special Effect - Create a special effect attached to the origin of SE_Dummy[3] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_SE_CasterLoc)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SE_Earth_Amount Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Do nothing
Code:
Summon Earth Die
Events
Unit - A unit Dies
Conditions
(Dying unit) Equal to SE_Caster
Actions
Unit - Kill SE_Dummy[1]
Unit - Kill SE_Dummy[2]
Unit - Kill SE_Dummy[3]
Set SE_Earth_Amount = 0
Trigger - Turn off Summon Earth Follow <gen>
Custom script: set udg_SE_Dummy[1]=null
Custom script: set udg_SE_Dummy[2]=null
Custom script: set udg_SE_Dummy[3]=null
And as the Summon Earth Follow trigger initially off.
And the Summon Earth Follow trigger doesnt make them follow.