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

Hemorrhage secondary ability

Status
Not open for further replies.
Level 5
Joined
Jan 15, 2018
Messages
128
Greeting,
I am seeking to create an ability which will damage a target unit then cast a spell on the damaged unit. For an in game example a unit is hit with the hero skill 'Hemorrhage' and then is hit with an ability (im using Faeire Fire) which shows it location for a duration to simulate a blood trail.

Here is what i have, however i cannot get the dummy to cast Track, he can only cast Faeire Fire as you can see in the script. Is there a simpler way to perform this or is this the way? i am a novice by the way.

  • Hemmorage
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Triggering unit) has buff Hemorrhage (Stacking)) Equal to True
    • Actions
      • Set VariableSet Hemorrhage_Caster = (Attacking unit)
      • Set VariableSet Hemorrhage_Dmg = (Attacked unit)
      • Set VariableSet Hemorrhage_TP = (Position of Hemorrhage_Caster)
      • Unit - Create 1 Dummy for (Owner of Hemorrhage_Caster) at Hemorrhage_TP facing Default building facing degrees
      • Set VariableSet Hemorrhage_Tempu = (Last created unit)
      • Unit - Add Track to Hemorrhage_Tempu
      • Unit - Order Hemorrhage_Tempu to Night Elf Druid Of The Talon - Faerie Fire (Attacked unit)
      • Unit - Add a 1.00 second Generic expiration timer to Hemorrhage_Tempu
      • Custom script: call RemoveLocation(udg_Hemorrhage_TP)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Are you sure the trigger is even getting past the Conditions?
1) Triggering unit = attacked unit (just for clarification sake).
2) If your Dummy is setup incorrectly it can cause problems, make sure it has: Speed Base 0, Movement Type: None, and Cast Point/Backswing set to 0.
3) Check if the Dummy can actually cast Track (mana cost, cast range, targets allowed, spell immunity, etc).

Also, you're ordering the Dummy to issue the "faeriefire" order on the attacked unit when you use this Action:
  • Unit - Order Hemorrhage_Tempu to Night Elf Druid Of The Talon - Faerie Fire (Attacked unit)
Understand that any ability that is based on Faerie Fire will use this order string. So as long as Track is based on Faerie Fire, or it's based on Channel with a Base Order Id set to "faeriefire", it will work.

You can find each abilities order string in the Object Editor, it should be near the abilities Name field. Also, it can help to create a trigger like this:
  • Events:
  • Unit - A unit is issued an order with no target
  • Unit - A unit is issued an order targeting a point
  • Unit - A unit is issued an order targeting an object
  • Actions:
  • Game - Display text message to All Players (Issued order)
This is useful for figuring out the names of orders. It should also help you understand how orders work. Remember, you aren't telling the Dummy unit to cast an ability with the name Faerie Fire, you're telling it to cast any ability that uses the order string "faeriefire".
 
Last edited:
Level 5
Joined
Jan 15, 2018
Messages
128
I made some changes and did some testing, and it doesn't seem to be working. The dummy is set up properly and Track is
Is it not getting past the conditions?

  • Hemmorage
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Triggering unit) Equal to (Attacked unit)
      • ((Triggering unit) has buff Hemorrhage (Stacking)) Equal to True
    • Actions
      • Set VariableSet Hemorrhage_Caster = (Attacking unit)
      • Set VariableSet Hemorrhage_Dmg = (Attacked unit)
      • Set VariableSet Hemorrhage_TP = (Position of Hemorrhage_Caster)
      • Unit - Create 1 Dummy for (Owner of Hemorrhage_Caster) at Hemorrhage_TP facing Default building facing degrees
      • Set VariableSet Hemorrhage_Tempu = (Last created unit)
      • Unit - Add Track (dummy) to Hemorrhage_Tempu
      • Unit - Order Hemorrhage_Tempu to Night Elf Druid Of The Talon - Faerie Fire Hemorrhage_Dmg
      • Unit - Add a 1.00 second Generic expiration timer to Hemorrhage_Tempu
      • Custom script: call RemoveLocation(udg_Hemorrhage_TP)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
The triggering unit is the same thing as the attacked unit, so this condition can be deleted (it's the same as asking if the attacked unit is the attacked unit):
  • (Triggering unit) Equal to (Attacked unit)

I want to clarify that this is how you want your trigger to work:
Whenever a unit with the Hemorrhage (Stacking) buff is attacked, create a Dummy for the Attacking unit and Order it to Faerie Fire the Attacked unit.

If this is what you want to happen then the issue is most likely one or more of the following:
  • The Dummy is setup incorrectly.
  • The Dummy cannot cast the ability or something is wrong with the ability. (mana, cast range, requirements, targets allowed, etc)
  • The ability cannot target the attacked unit.
  • The buff is incorrect. Check both the abilities and the trigger to see if they match.
You should add Track (dummy) to a non-Locust unit and see if you can cast it that way.

Also, it's quite easy to tell if a trigger is getting past the conditions. You can display a text message, add 99999 Gold to Player 1, create a unit/special effect, etc... Anything that you can visibly see.
 
Last edited:
Status
Not open for further replies.
Top