Distance between target/missile speed +rep for help

Furberg

Ultra Cool Member
Reaction score
45
So here is something that doesn't work and i dont know why. This is first time i use distance between units trigger. So i want the actions to happen right when the missile collides with target. But it seems not to work. Here is trigger:
Code:
Axe
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Axe 
    Actions
        Wait (1150.00 / (Distance between (Position of (Triggering unit)) and (Position of (Target unit of ability being cast)))) seconds
        Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((0.25 x (Real((Level of Daze (dummy) for (Triggering unit))))) + (Real((Strength of (Triggering unit) (Include bonuses))))) damage of attack type Spells and damage type Normal
        Unit - Create 1 Dummy 2 for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
        Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)

btw: 1150 is missilespeed of spell..

+rep for help
 

Ashcat

Hellooo
Reaction score
68
Sorry I can't help fix your problem, but when I do things like this, I usually have a projectile spell that does 1 damage or so, then have a trigger to detect when the damage is dealt by the dummy unit, and cause actions to occur then. It seems like a better method to me.
 

Furberg

Ultra Cool Member
Reaction score
45
Sorry I can't help fix your problem, but when I do things like this, I usually have a projectile spell that does 1 damage or so, then have a trigger to detect when the damage is dealt by the dummy unit, and cause actions to occur then. It seems like a better method to me.

Errm. Sounds like a good tactic - Please explain deeper mate :thup:
 

Ashcat

Hellooo
Reaction score
68
Well, basically, what I like to do is have a spell that creates a dummy unit, and have it use some projectile spell on the target. Even if the spell does 0 damage, it can still be detected with the "Unit - Specific Unit takes damage" as long as it is a generally offensive spell. Then it's as simple as storing a few units as variables, and waiting for the target of your spell to take damage from the dummy unit. Then just remove the dummy unit, and cause all your actions to happen. Its also a good idea to give the dummy unit about a 10 second expiration timer or so, incase the target dies before the projectile reaches it.
 

Furberg

Ultra Cool Member
Reaction score
45
Well, basically, what I like to do is have a spell that creates a dummy unit, and have it use some projectile spell on the target. Even if the spell does 0 damage, it can still be detected with the "Unit - Specific Unit takes damage" as long as it is a generally offensive spell. Then it's as simple as storing a few units as variables, and waiting for the target of your spell to take damage from the dummy unit. Then just remove the dummy unit, and cause all your actions to happen. Its also a good idea to give the dummy unit about a 10 second expiration timer or so, incase the target dies before the projectile reaches it.

AAAAAAH.!!! Thanks mate! +rep
 

emootootoo

Top Banana
Reaction score
51
You did speed over distance. It's meant to be distance over speed like you have in the thread title. It wont be accurate anyway if the target is moving though.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top