Spell Help

Blackrage

Ultra Cool Member
Reaction score
25
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:
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.
 

Frozenwind

System maker
Reaction score
99
Watch to this trigger:
Code:
Summon Earth Follow
    Events
        Time - Every 0.06 seconds of game time
    Conditions
    Actions
        Set SE_CasterLoc = (Position of SE_Caster)
        [COLOR="Red"]Unit - Move SE_Dummy[1] instantly to (SE_CasterLoc offset by 100.00 towards (1.00 x 90.00) degrees)[/COLOR]
        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)
        [COLOR="Red"]Unit - Move SE_Dummy[1] instantly to (SE_CasterLoc offset by 100.00 towards (2.00 x 90.00) degrees)[/COLOR]
        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)
       [COLOR="Red"] Unit - Move SE_Dummy[1] instantly to (SE_CasterLoc offset by 100.00 towards (3.00 x 90.00) degrees)[/COLOR]
        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
                [COLOR="Blue"]Do nothing[/COLOR]
Look to the red marked functions.
Why you move 1 unit 3x instantly to a certain point withing 0,01 seconds?

Look to the blue marked function.
"Do Nothing" can be removed, its useless. It's only neccesary if u do: if condition then do something else do nothing (so in 1 string).

frozenwind.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top