• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] what is the problem of <unit finishes casting an ability>?

Status
Not open for further replies.
Hello, I made a trigger that serves as shadowstep for rogue.
When I use <unit starts effect of an ability it woks fine, but shadowstep does not get a cooldown
When I use <unit finishes casting an ability> this tigger moves my unit in the center of the map?!

edit: does <target of ability being cast> disappear after the spell is done, and that's why it sends my unit in the center of the map?
  • Shadowstep
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Shadowstep
    • Actions
      • Set Rogue_Shadowstep_Loc[1] = (Position of (Target unit of ability being cast))
      • Set Rogue_Shadowstep_Loc[2] = (Rogue_Shadowstep_Loc[1] offset by 50.00 towards ((Facing of (Target unit of ability being cast)) - 180.00) degrees)
      • Unit - Move (Casting unit) instantly to Rogue_Shadowstep_Loc[2], facing (Facing of (Target unit of ability being cast)) degrees
      • Custom script: call RemoveLocation(udg_Rogue_Shadowstep_Loc[1])
      • Custom script: call RemoveLocation(udg_Rogue_Shadowstep_Loc[2])
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
Yes, the event "Finishes casting an ability" no longer has targeted point, nor targeted unit. It only has Ability Being Cast and triggering unit afaik.

You can make 2 triggers -> "Starts the effect", where you save the targeted point/unit into variable; and the other trigger "Finishes the effect" where you load saved unit/point.
 
Level 18
Joined
May 11, 2012
Messages
2,103
  • When I use <unit starts effect of an ability it woks fine, but shadowstep does not get a cooldown
It's because of insta-move.
Use SetUnitX/Y or check "Disable Other Abilities" if you're using Channel as a base ability.
 
Yes, the event "Finishes casting an ability" no longer has targeted point, nor targeted unit. It only has Ability Being Cast and triggering unit afaik.

You can make 2 triggers -> "Starts the effect", where you save the targeted point/unit into variable; and the other trigger "Finishes the effect" where you load saved unit/point.

that worked :thumbs_up:
 
Status
Not open for further replies.
Top