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

[Solved] Help with a channelling ability

Status
Not open for further replies.
Level 8
Joined
Mar 15, 2007
Messages
230
I'm trying to create an ability that channels (based on Channel) for three seconds before creating a dummy unit that does Carrion Swarm. Everything works fine, until its time for the dummy unit to cast Carrion Swarm. It just won't do it. The dummy gets created, but it won't cast the damn spell, and I'm stumped. Anyway, here are my triggers:

  • Snipe Cast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Snipe (Rogue)
    • Actions
      • Set VariableSet Snipe_Point = (Position of (Casting unit))
      • Set VariableSet Snipe_Point2 = (Target point of ability being cast)
      • Unit - Create 1 Snipe Dummy for (Owner of (Casting unit)) at Snipe_Point facing Default building facing degrees
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm Snipe_Point2
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Snipe_Point)
      • Custom script: call RemoveLocation (udg_Snipe_Point2)
Other pertinent info is that my dummy unit is based on the Locust, so I don't think it's the problem. I also set the mana cost and cooldown of my Carrion Swarm ability are 0.
 
Last edited:
Level 8
Joined
Mar 15, 2007
Messages
230
The dummy has the ability, and the ability costs zero mana.

UPDATE: Ok, I did some testing and the problem has to do with getting the target location of the ability being cast.

UPDATE 2: Ok, after changing my trigger to try using a point with polar offset, and now I have no idea what I'm doing.

  • Snipe Cast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Snipe (Rogue)
    • Actions
      • Set VariableSet Snipe_Point = (Position of (Casting unit))
      • Set VariableSet Snipe_Real = (Facing of (Casting unit))
      • Unit - Create 1 Snipe Dummy for (Owner of (Casting unit)) at Snipe_Point facing Default building facing degrees
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm (Snipe_Point offset by 256.00 towards Snipe_Real degrees.)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Snipe_Point)
 
Last edited:

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
Only "A unit begins channeling/casting an ability" and "A unit starts the effect of an ability" will give you a "Target point of ability being cast". Finishes casting an ability does not as that information has been lost by the time it runs.

Your new trigger looks like it should work fine. Although, keep in mind that terrain restrictions like untargetable areas can prevent the Dummy from casting the ability. Maybe try setting the offset to something like 0.01.

And just to reiterate what I said in your previous thread, make sure your Dummy is setup properly!
 

Attachments

  • Dummy Unit.w3m
    16.2 KB · Views: 38
Last edited:

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
Then it really should work, hmm... Does the Dummy have the ability? Maybe you forgot to add it in the Object Editor or planned to add it with triggers but never did.

Another thing, try adding the Dummy ability to a different unit and manually casting it yourself to see if the ability actually works.

If it still doesn't work after that then maybe post your map and I could take a look at it, if you don't mind.
 
Level 8
Joined
Mar 15, 2007
Messages
230
YES!!! I figured it out! When I gave the dummy Carrion Swarm ability to my hero, the ability worked, as did the channeling ability with the triggers. The problem was that I had the base order ID for my channeling ability set to carrion swarm and when I changed it to thunder bolt, suddenly my trigger enhanced ability worked. I figured that anything using the carrion swarm order ID requires the carrion swarm caster buff, which is why it never worked before. Thanks for all your help, Uncle and Deserted, and thanks for the offer to look at my map.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
Ah, yeah, changing the order ID doesn't work, I don't know why it's even an option still.

The only abilities that you can do this with are Channel, Charge Gold and Lumber, and Spellbook, and they have specific fields for changing their Base Order IDs.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
What do you mean? It should work fine.

Are you using the correct ID field? Look at the picture I attached.

After it's set you can reference the Order ID like so:
  • Unit - Order (Triggering unit) to Orc Far Seer - Chain Lightning (Target unit of ability being cast)
 

Attachments

  • example.png
    example.png
    37.8 KB · Views: 50
Level 8
Joined
Mar 15, 2007
Messages
230
Yep. I'm editing the correct field. I've also noticed similar behavior with the Cluster Rockets spell, where if you edit/remove the caster buff, the spell no longer functions.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
I understand that removing the buff from the actual Carrion Swarm/Cluster Rockets spell causes issues, but I'm still confused as to what you mean when you say "changing Channel's base order ID to carrion swarm does not work without the carrion swarm caster buff".

What do you mean by "does not work"?

Because the only thing that changing the Order ID does is allow you to have multiple Channel abilities on the same unit, and it also allows you to do this:
  • Unit - Order (Triggering unit) to Undead Dreadlord - Carrion Swarm (Center of (Playable map area))
^Channel with the Base Order ID of Carrion Swarm will cast in the above trigger. It won't cast Carrion Swarm, it'll just cast the Channel ability, which is how it's intended to work since it's meant to be used in conjunction with Triggers.
 
Level 8
Joined
Mar 15, 2007
Messages
230
Hmm... weird. All I know is that the ability I made didn't work until I changed the Order ID of my channeling ability from Carrion Swarm to Thunder Bolt. The trigger would summon the unit, but the unit would cast carrion swarm until I changed the Order ID.
 
Status
Not open for further replies.
Top