My Spell wont work properly

Da_HP_Geek

New Member
Reaction score
8
Why wont this work? I bet that it is something with picked unit in my loop...

Trigger:
  • Incarcerous
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Incarcerous
    • Actions
      • Set Caster_Point = (Position of (Triggering unit))
      • Set Target_Point = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (100.00 x (Real((Level of Incarcerous for (Triggering unit))))) of Target_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Caster_Point facing Default building facing degrees
          • Unit - Set level of Dummy Ability for (Last created unit) to (Level of Incarcerous for (Triggering unit))
          • Unit - Order (Last created unit) to Orc Raider - Ensnare (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Pause (Picked unit)
          • Wait (1.25 x (Real((Level of Incarcerous for (Picked unit))))) seconds
          • Unit - Unpause (Picked unit)
      • Custom script: call RemoveLocation( udg_Caster_Point )
      • Custom script: call RemoveLocation( udg_Target_Point )
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
you cant use wait in the loop
and whats the point to ensnare him if you pause him? if you want to make the unit unusable, stun him intand
 

simonake

New Member
Reaction score
72
Must set Triggering unit to a varaible because you wait, the triggering unit is forgot by wc3. If there's more units than 1 in the group, it will fail.
 

Nexor

...
Reaction score
74
triggering unit isn't forgotten by wc3, you're wrong, any other variable that is global could be overwritten and that's the problem
 

Genkora

Frog blast the vent core!
Reaction score
92
Must set Triggering unit to a varaible because you wait, the triggering unit is forgot by wc3. If there's more units than 1 in the group, it will fail.

wc3 will keep track of triggering unit for about 10 seconds, after that you have to use variables. Event responses are MUI so long as they aren't used too long. But there shouldn't be a wait in the loop.
 
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