• 🏆 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!

Problem with target point of an ability

Status
Not open for further replies.
Level 4
Joined
Jan 5, 2014
Messages
79
I was doing somethink with trigger spells and dummy units and i found out this:

I have a dreadlord with the ability Carrion swarm.

I have a trigger, which should do this:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
    • Actions
      • Unit - Create 1 Dummy for Player 1 (Red) at (Target point of ability being cast) facing Default building facing degrees
but the Dummy unit is created always at one point (probably at the centre of playable map area). Do you know why?

Edit:
I alredy found out. The target point of ability being cast is always 0,0. Now the question is: does someone know why?
 
Level 25
Joined
Sep 26, 2009
Messages
2,388
There is no "target point of ability being cast" for the event "Unit finishes casting an ability" nor is for "unit stops casting an ability".
There is also no "target unit of ability being cast" for such events.

You will most likely need to use different event ("Start the effect of an ability") or store the information (in this case: target point) when unit starts casting the ability and then load the point when unit finishes casting an ability.
 
Level 4
Joined
Jan 5, 2014
Messages
79
Somethink i found out: The response Target point of ability being cast does rospond to unit starts casting an ability but does not respond to Unit finishes casting an ability. strange
 
Level 25
Joined
Sep 26, 2009
Messages
2,388
It's not strange really. There is no longer any ability being currently cast, since the event fires the moment the unit stops casting it. That way all the relevant data (target unit, target point and maybe some other) are lost.

As I wrote in my previous post, you will either need to use the event "Starts casting an ability" for the event to fire, or you will use that event to just save the target point of ability being cast into variable and when unit "Finishes casting an ability", you will load the point from the variable you saved it into.
 
Status
Not open for further replies.
Top