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

[General] Dummy that moves to point from each attack of the range attacker

Level 7
Joined
Oct 6, 2022
Messages
135
Hello guys, Good Morning/Afternoon/Evening i would like to know how to make the Range unit create a dummy(DagonBreath dummy) that moves to x point at x speed. From each attack of the Range unit does weather the Range unit attack becomes faster or slower, it won't create a dummy of the attack of the Range unit stop.


Hope you guys could help me with this one, thank you all in advance.
 
Level 39
Joined
Feb 27, 2007
Messages
5,031
I don’t quite understand what you want to do. If it would help you can post in your native language and we can use a translator to see if that makes more sense.

I understand you want a dragon breath dummy to follow a line after every attack. That’s not hard. The second half confuses me. You want the breath attack to be the same speed every time, and if the unit attacks again before the breath has ‘finished’ then it won’t make a new breath?
 
Level 7
Joined
Oct 6, 2022
Messages
135
I don’t quite understand what you want to do. If it would help you can post in your native language and we can use a translator to see if that makes more sense.

I understand you want a dragon breath dummy to follow a line after every attack. That’s not hard. The second half confuses me. You want the breath attack to be the same speed every time, and if the unit attacks again before the breath has ‘finished’ then it won’t make a new breath?
My apologies i didn't able to make it clear properly cause of my cold, from the speed is the more faster the attack of Range unit, the more dragon breath dummy creates. It won't create dragon breath dummy if the unit stop attacking or interrupted like stunned.

3896847e-8157-44d4-ab99-537d58bd26e9.png
 
Level 39
Joined
Feb 27, 2007
Messages
5,031
Okay so faster attack speed = faster wave, but distance is always the same.

Does the attacking unit have ranged attack with a projectile speed? I think the best solution is to make the attack instant without a projectile (like Human Rifleman), then we can use damage from the attack to trigger the line/wave.

This could be done quite simply by dummy-casting a Carrion Swarm ability, but if you want more advanced visual effects you could do the line search yourself.
 
Level 39
Joined
Feb 27, 2007
Messages
5,031
  • Fire Breath
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to YOUR_UNIT
      • (Damage From Normal Attack) Equal to True
    • Actions
      • Set TP1 = (Position of (Triggering Unit))
      • Set TP2 = (Position of (Damage source))
      • Set Atk_Interval = (Unit: (Triggering unit)'s Weapon Real Field: Attack Base Cooldown ('ua1c') at Index:0) //how long between attacks, which is NOT the same as attack speed
      • Set Atk_Speed = (1.00 / Atk_Interval)
      • Set Missile_Speed = (SOME_BASE_VALUE_YOU_CHOOSE x (SOME_OTHER_FACTOR_YOU_CHOOSE x Atk_Speed)) //these two constants are for your own configuration to get the behavior you want
      • Unit - Create 1 DUMMY_UNIT at TP2 facing (Default building facing) degrees
      • Set DumCast = (Last created unit)
      • Unit - Add a 1.00 generic expiration timer to DumCast
      • Ability - Set Ability: (Unit: DumCast's Ability with Ability Code: Carrion Swarm)'s Integer Field: Missile Speed ('amsp') to (Integer(Missile_Speed))
      • -------- If you want to scale the breath damage with the unit's attack damage, you would do so here --------
      • Unit - Order DumCast to Undead Dread Lord - Carrion Swarm TP1
      • Custom script: call RemoveLocation(udg_TP1) //match your variable names here but keep the udg_ prefix
      • Custom script: call RemoveLocation(udg_TP2)
There are two issues with this. First, the integer field can't be set properly because of some bug. Second, as far as I understand the attack delay that is reported by the trigger does not take agility, items, or other buffs into account that would affect attack speed. There are no native functions you can use to get a unit's actual attack speed; you must compute it by knowing which effects are on it.
 
Level 7
Joined
Oct 6, 2022
Messages
135
  • Fire Breath
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Damage source)) Equal to YOUR_UNIT
      • (Damage From Normal Attack) Equal to True
    • Actions
      • Set TP1 = (Position of (Triggering Unit))
      • Set TP2 = (Position of (Damage source))
      • Set Atk_Interval = (Unit: (Triggering unit)'s Weapon Real Field: Attack Base Cooldown ('ua1c') at Index:0) //how long between attacks, which is NOT the same as attack speed
      • Set Atk_Speed = (1.00 / Atk_Interval)
      • Set Missile_Speed = (SOME_BASE_VALUE_YOU_CHOOSE x (SOME_OTHER_FACTOR_YOU_CHOOSE x Atk_Speed)) //these two constants are for your own configuration to get the behavior you want
      • Unit - Create 1 DUMMY_UNIT at TP2 facing (Default building facing) degrees
      • Set DumCast = (Last created unit)
      • Unit - Add a 1.00 generic expiration timer to DumCast
      • Ability - Set Ability: (Unit: DumCast's Ability with Ability Code: Carrion Swarm)'s Integer Field: Missile Speed ('amsp') to (Integer(Missile_Speed))
      • -------- If you want to scale the breath damage with the unit's attack damage, you would do so here --------
      • Unit - Order DumCast to Undead Dread Lord - Carrion Swarm TP1
      • Custom script: call RemoveLocation(udg_TP1) //match your variable names here but keep the udg_ prefix
      • Custom script: call RemoveLocation(udg_TP2)
There are two issues with this. First, the integer field can't be set properly because of some bug. Second, as far as I understand the attack delay that is reported by the trigger does not take agility, items, or other buffs into account that would affect attack speed. There are no native functions you can use to get a unit's actual attack speed; you must compute it by knowing which effects are on it.
Ah thanks, unfortunately some of the triggers like "a unit takes damage" event doesn't exist on version 1.30 of Warcraft. However, thank you for helping me out @Pyrogasm
 
Top