Pause units ability

Olmeca

Member
Reaction score
2
I want to do an ability than picks units in range of 400 around the target point of ability being cast, pause them for 4 seconds and unpause to they can move again, is a channeling spell, if the caster interrupts the spell all effects disappear.
But, I need set "picked units" or "matching unit", and/or "unit group"?

I do 4 triggers,
1 - when cast the spell and actives other 3 triggers;
2 - every 1 sec, moves enemy units in 400 range of "target point of ability being cast"
3 - every 1 sec, pause picked units, animation changes to "none", wait 4 secs and unpause picked units.
4 - unit is issued an order with no target/ targeting an object/ target a point = "Cast_Hero" cancels "2" & "3" - after turn on this 3 triggers (2,3 and 4) wait 4 seconds and turn off them.

But nothings happens, help please...:D
 

Rushhour

New Member
Reaction score
46
Would be helpful if you posted your triggers ;)
Copy as text and then paste them in and put it in [WC3.] [/WC3.] tags (without dot)
But somethings to note already:
Target point of ability being cast, casting unit; these event responses might not work anymore after a wait, you should store them in a variable. But then you have to be careful if you want this to be MUI /MPI
 

Olmeca

Member
Reaction score
2
working on

I still do some changes on the triggers, but I think somethings wrong...
 

Attachments

  • BH-01.JPG
    BH-01.JPG
    33 KB · Views: 85
  • BH-02.JPG
    BH-02.JPG
    13.2 KB · Views: 75
  • BH-03.JPG
    BH-03.JPG
    17 KB · Views: 73
  • BH-04.JPG
    BH-04.JPG
    26.2 KB · Views: 60

Ayanami

칼리
Reaction score
288
Firstly, use "Unit - A unit Starts the effect of an ability" instead of "Unit - A unit Begins casting an ability". And I suggest you use (Triggering unit) instead of (Casting unit). It makes almost no difference, but (Triggering unit) is a bit faster.

Secondly, about this line.

Trigger:
  • Actions
    • Set black_point = (Target point of ability being cast)
    • Set Black_Hole_cluster = (Units within 450 of (Target Point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)


Why are you setting black_point and not using it? By using (Target point of ability being cast) in your Black_Hole_cluster variable, it causes a location leak. Use your variable, black_point instead of (Target point of ability being cast). And then at the end of your trigger, remove it with "Custom script: call RemoveLocation(udg_black_point). Groups also leak after you set them in a variable. So remove it with DestroyGroup(udg_Black_Hole_cluster). So your "Black Hole set" would look something like this.

Trigger:
  • Black Hole set
    • Events
      • A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Black Hole
    • Actions
      • Set Cast_Hero = (Triggering unit)
      • Set black_point = (Target point of ability being cast)
      • Set Black_Hole_cluster = (Units within 450 of black_point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)
      • Trigger - Turn on Black Hole pulls units <gen>
      • Trigger - Turn on Black Hole pause <gen>
      • Trigger - Turn on Black Hole pulls ends <gen>
      • Wait 4.00 seconds
      • Trigger - Turn off Black Hole pulls units <gen>
      • Trigger - Turn off Black Hole pause <gen>
      • Trigger - Turn off Black Hole pulls ends <gen>
      • Custom script: call DestroyGroup(udg_Black_Hole_cluster)
      • Custom script: call RemoveLocation(udg_black_point)


Thirdly, this trigger.

Trigger:
  • Black Hole pause
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Animation - Play (Picked unit)'s none animation
      • Unit - Pause (Picked unit)
      • Wait 4.00 seconds
      • Animation - Play (Picked unit)'s stand animation
      • Unit - Unpause (Picked unit)


There is no (Picked unit) since it isn't under a group loop action. It should be this.

Trigger:
  • Black Hole pause
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick Every unit in Black_Hole_cluster and do (Actions)
        • Loop - Actions
          • Animation - Play (Picked unit)'s none animation
          • Unit - Pause (Picked unit)
      • Wait 4.00 seconds
      • Unit Group - Pick Every unit in Black_Hole_cluster and do (Actions)
        • Loop - Actions
          • Animation - Play (Picked unit)'s stand animation
          • Unit - Unpause (Picked unit)


Hope that helps.

Glenphir
 

Olmeca

Member
Reaction score
2
Done

I see everything and I do some changes,
on the "Black_Hole_cluster" is matching unit is alive and belongs to an enemy of "Caster_Hero" this is for no move corpases because you move them and when the ability ends you see the units than was killed.

and I think this ability works well (for me), thanks pals.:thup:
 

Attachments

  • BHN-00.JPG
    BHN-00.JPG
    31 KB · Views: 65
  • BHN-01.JPG
    BHN-01.JPG
    40.5 KB · Views: 66
  • BHN-02.JPG
    BHN-02.JPG
    26 KB · Views: 72
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