Only Runs Loop once

Toriad

New Member
Reaction score
4
This ability when used should create 5 dummy units at random locations around the caster then have them cast my custom ability based off shockwave in random directions based around the caster.

However it only does it once, but "debug" pops up 5 times.

Code:
ShatterEarth
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Shatter Earth 
    Actions
        Set Temp_Point = (Position of (Casting unit))
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Game - Display to (All players) the text: debug
                Unit - Create 1 DummyUnit (Custom Campaign) for (Owner of (Casting unit)) at (Random point in range of Temp_Point, with a maximum range of 500.00) facing (Random point in range of Temp_Point, with a maximum range of 500.00)
                Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Random point in range of Temp_Point, with a maximum range of 1000.00)
                Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        Point - Remove Temp_Point
 

vypur85

Hibernate
Reaction score
803
Hmmm... The code seems weird. Never seen them before in WE. But it seems correct. And should have 5 units spawned. Try spawning 5 Footman instead of invisible dummies. See if they are spawned. Since the debug message appeared 5 times, it shouldn't be the loop problem. It should be the unit problem. No other further suggestions except by changing 'Casting unit' to 'Triggering unit'? Don't think this will help though. Seems to be the same.
 

Toriad

New Member
Reaction score
4
the reason for the odd code is cause its apart of WE unlimited... best thing ever for gui triggers.

Also i think I should note that it works with footman and other custom units just not this one... I think I have a solution ;p
 

Toriad

New Member
Reaction score
4
Sorry Acehart, say that again...

Also, figured out something else, when I DONT have them cast the shockwave, it does work. When I enable the cast it doesn't work.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
The problem is this line:
Unit - Create 1 DummyUnit (Custom Campaign) for (Owner of (Casting unit))

"Casting unit" gets lost once your trigger does its own casting.


Set Caster = (Casting unit)
...
Unit - Create 1 DummyUnit (Custom Campaign) for Caster
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top