• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

a simple question

Status
Not open for further replies.
Just do the classic technique, trigger the ability from scratch, with Dummy Units being the projectile of the missile.
And when it is near enough, kill the dummy unit and damage the unit.

Although there is a simpler way, using Speed = Distance / Time method, BUT, this will only work if the target source is not moving at all, therefore you can have a constant time.
 
Although there is a simpler way, using Speed = Distance / Time method, BUT, this will only work if the target source is not moving at all, therefore you can have a constant time.
That would be simpler but not "Simplest" :ogre_love:. Here i have one [the simplest]:
I'm going to base the example from the DotA spell: Impetus of Enchantess
Which just need an ability has a buff on impact [Here i call Impetus (from DotA). Auto cast would even better
And some trigger skills, combined with damage detection system


Upon receiving damage of a unit, check if it has a buff Impetus, then we'll do the damage job. For example you can have this:
  • UnitTakeDamage
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • -------- ---------------------- --------
      • Set TempUnit = GDD_DamagedUnit
      • Set TempUnit2 = GDD_DamageSource
      • Set TempReal = GDD_Damage
      • -------- Impetus --------
      • Set TempInt = (Level of Impetus for TempUnit2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt Greater than 0
          • (TempUnit has buff Impetus ) Equal to True
        • Then - Actions
          • Unit - Remove Impetus buff from TempUnit
          • Set TempLoc = (Position of TempUnit2)
          • Set TempLoc2 = (Position of TempUnit)
          • Set TempReal = ((Distance between TempLoc and TempLoc2) x (0.04 x (Real(TempInt))))
          • Unit - Cause TempUnit2 to damage TempUnit, dealing TempReal damage of attack type Chaos and damage type Universal
        • Else - Actions
      • -------- ---------------------- --------
There you go, an auto cast, cool distance-damage and impact checking is done. In case you didn't get it, I'll attach you a demo map, but this one won't use the Damage Detection System i gave so all variables about "GDD_" wouldn't useful anymore. Goodluck
View attachment [Demo]AutoCast.w3x
Caution: There're leaks inside. Destroy those TempLoc and TempLoc2 :P

Hope it's helpful to you as everyone else
P/S: Congratulate on Zephyr's 1st place defskull :P (forgot to)
 
Status
Not open for further replies.
Back
Top