Polishing off a jumping hex

b_ray210

Active Member
Reaction score
1
Hey, I am trying to make a jumping hex spell but i am having big problems. I am trying to make it jump 3 times at level 1 and each jump is supposed to have the spiritlink lightning effect. Here is the trigger i made:
Code:
Hex Wave
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Hex Wave 
    Actions
        Set HWTarget = (Target unit of ability being cast)
        Set HWTargetPos = (Position of HWTarget)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Hex Wave  for (Triggering unit)) Equal to 1
            Then - Actions
                -------- FIRST JUMP --------
                Lightning - Create a Spirit Link lightning effect from source (Position of (Triggering unit)) to target (Position of HWTarget)
                Unit - Create 1 dummy unit for (Owner of (Triggering unit)) at (Position of HWTarget) facing Default building facing degrees
                Unit - Add dummy hex (VOODOO MAGICIAN)  to (Last created unit)
                Unit - Set level of dummy hex (VOODOO MAGICIAN)  for (Last created unit) to (Level of Hex Wave  for (Triggering unit))
                Unit - Order (Last created unit) to Orc Shadow Hunter - Hex HWTarget
                Lightning - Destroy (Last created lightning effect)
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Set HWGroup = (Units within 500.00 of HWTargetPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is hidden) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Triggeri
                Set HWRandomUnit[1] = (Random unit from HWGroup)
                Set HWRandomUnitPos = (Position of HWRandomUnit[1])
                Custom script:   call RemoveLocation(udg_HWTargetPos)
                -------- SECOND JUMP --------
                Wait 0.40 seconds
                Lightning - Create a Spirit Link lightning effect from source (Position of HWTarget) to target (Position of HWRandomUnit[1])
                Unit - Create 1 dummy unit for (Owner of (Triggering unit)) at (Position of HWRandomUnit[1]) facing Default building facing degrees
                Unit - Add dummy hex (VOODOO MAGICIAN)  to (Last created unit)
                Unit - Set level of dummy hex (VOODOO MAGICIAN)  for (Last created unit) to (Level of Hex Wave  for (Triggering unit))
                Unit - Order (Last created unit) to Orc Shadow Hunter - Hex HWRandomUnit[1]
                Lightning - Destroy (Last created lightning effect)
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Custom script:   call DestroyGroup(udg_HWGroup)
                Set HWGroup = (Units within 500.00 of HWTargetPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is hidden) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Triggeri
                Custom script:   call RemoveLocation(udg_HWRandomUnitPos)
                Set HWRandomUnit[2] = (Random unit from HWGroup)
                Set HWRandomUnitPos = (Position of HWRandomUnit[2])
                -------- THIRD JUMP --------
                Wait 0.40 seconds
                Lightning - Create a Spirit Link lightning effect from source (Position of HWRandomUnit[1]) to target (Position of HWRandomUnit[2])
                Unit - Create 1 dummy unit for (Owner of (Triggering unit)) at (Position of HWRandomUnit[2]) facing Default building facing degrees
                Unit - Add dummy hex (VOODOO MAGICIAN)  to (Last created unit)
                Unit - Set level of dummy hex (VOODOO MAGICIAN)  for (Last created unit) to (Level of Hex Wave  for (Triggering unit))
                Unit - Order (Last created unit) to Orc Shadow Hunter - Hex HWRandomUnit[2]
                Lightning - Destroy (Last created lightning effect)
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Custom script:   call DestroyGroup(udg_HWGroup)
                Custom script:   call RemoveLocation(udg_HWRandomUnitPos)
            Else - Actions

The problem is it only jumps twice and there are NO lightning effects at all. Don't worry that there is only 1 level. because i didnt bother to make the other 2 after this :(. I was going to make it that at level 1 it jumps 3 times, level 2 jumps 4 times, and level 3 jumps 5 times if anyone has an easier way to do that also.
 

Flare

Stops copies me!
Reaction score
662
Creating then immediately destroying lightning effects causes them to not show - you can use this to handle the lightning effects (requires NewGen WE to use)

As regards the bouncing, what exactly is it doing? (O = targets)

O -> O
O -> O -> O
(or something else)

if anyone has an easier way to do that also.
Integer loops will be able to do it
 

b_ray210

Active Member
Reaction score
1
Yea i dont want to get into the whole new gen thing.
First Level: O -> O -> O
Second Level: O -> O -> O -> O ->
Third Level: O -> O -> O -> O -> O ->
Can you show me how to do the loops?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top