• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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 26
Joined
Sep 26, 2009
Messages
2,418
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