ability won't start cooling down

akuzaid93

New Member
Reaction score
3
Code:
Tauren Strike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Tauren Strike (Tauren)
    Actions
        Unit - Move (Triggering unit) instantly to (Position of (Target unit of ability being cast))
        Animation - Play (Triggering unit)'s slam animation
        Wait 0.50 seconds
        Unit - Create 1 dummyunit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
        Set DummyUnit[5] = (Last created unit)
        Unit - Add Thunder Clap (dummies) to DummyUnit[5]
        Unit - Set level of Thunder Clap (dummies) for DummyUnit[5] to (Level of Taurren Strike (Tauren) for (Triggering unit))
        Unit - Turn collision for DummyUnit[5] Off
        Unit - Order DummyUnit[5] to Human Mountain King - Thunder Clap
        Unit - Remove DummyUnit[5] from the game
        Set DummyUnit[5] = No unit

the problem is that after the ability being casted, there will be no cooldown.


why?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
The problem is that Unit - Move (Triggering unit) instantly to (Position of (Target unit of ability being cast)) interrupts what the unit is doing. I believe the solution is to pause the unit beforehand and unpause it afterward.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Yes: pause, move, unpause, all in the same trigger.

[edit] Alternately, use the custom script lines:
call SetUnitX(GetTriggerUnit(), GetSpellTargetX())
call SetUnitY(GetTriggerUnit(), GetSpellTargetY())

Also, you're leaking locations in your trigger, but that doesn't have to to do with your current problem.
 

akuzaid93

New Member
Reaction score
3
can you explain the custom script?
and, please tell me what should I do to overcome the leaks.

[EDIT]
Unit - Move (Triggering unit) instantly to (Position of (Target unit of ability being cast))

this action is ignored, i use this
pause
Unit - Move (Triggering unit) instantly to (Position of (Target unit of ability being cast))
unpause
orther actions
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
can you explain the custom script?
Add two custom script actions and paste one line to each. It is JASS script to move the unit to the spell's target coordinates without interrupting it, using a different function than the one used by GUI's Move Instantly.

and, please tell me what should I do to overcome the leaks.
Read a tutorial and you will know.

[EDIT]
Unit - Move (Triggering unit) instantly to (Position of (Target unit of ability being cast))

this action is ignored, i use this
pause
Unit - Move (Triggering unit) instantly to (Position of (Target unit of ability being cast))
unpause
orther actions
Yes...? What are you asking?
 
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