HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Complex waiting for Custom spells

09-24-2006, 07:51 PM#1
Nubcookie
Hello again. I'm making an explosive arrow spell and the hero part is based of off channel. So this is what happens: the hero casts explosive arrow, this trigger goes off,
Trigger:
Exploding Arrow
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Explosive Arrow DUMMY HERO ABILITY
Collapse Actions
Wait x seconds
I want to make x the distance it would take the projectile fired from the hero (@ 600 missile speed) to the targeted area. The range on the spell is 400/450/450/500. Any help would be appreciated very much. +1 rep
09-24-2006, 08:17 PM#2
The)TideHunter(
Distance / Speed = Time

Trigger:
Actions
Set Distance = (400.00 + ((Real((Level of 'Your Ability' for (Triggering unit)))) x 50.00))
Wait (Distance / 600.00) seconds
09-24-2006, 11:35 PM#3
Nubcookie
Err, another queston, why doesn't this work:

Trigger:
Exploding Arrow
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Explosive Arrow DUMMY HERO ABILITY
Collapse Actions
If ((Level of Explosive Arrow DUMMY HERO ABILITY for (Triggering unit)) Equal to 1) then do (Set Distance = 400) else do (Do nothing)
If ((Level of Explosive Arrow DUMMY HERO ABILITY for (Triggering unit)) Equal to 2) then do (Set Distance = 450) else do (Do nothing)
If ((Level of Explosive Arrow DUMMY HERO ABILITY for (Triggering unit)) Equal to 3) then do (Set Distance = 450) else do (Do nothing)
If ((Level of Explosive Arrow DUMMY HERO ABILITY for (Triggering unit)) Equal to 4) then do (Set Distance = 500) else do (Do nothing)
Unit - Create 1 Dummyman for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing (270.0) degrees
Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
Set explodingarrow = (Last created unit)
Unit - Create 1 Dummyman for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
Unit - Set level of Explosive Arrow UNIT for (Last created unit) to (Level of Explosive Arrow DUMMY HERO ABILITY for (Triggering unit))
Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb explodingarrow
Wait ((Real(Distance)) / 600.00) seconds
...
The part that doesn't work is when the Dummyman is supposed to "Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb explodingarrow". The ability works, it can attack friendlies. I just don't know why my Dummymen are failing me.
09-24-2006, 11:41 PM#4
Anitarf
Check that they have the ability to begin with and enough initial mana to cast it.
09-24-2006, 11:43 PM#5
Nubcookie
They do indeed. :(

If I take away locast and invun, I can have them kill each other. O.o
09-24-2006, 11:52 PM#6
Anitarf
Well, duh, locusted units can't be targeted, so you couldn't cast the spell targeting the other dummy.
09-25-2006, 12:01 AM#7
Nubcookie
Really, even through triggers? Hmm, I'll try that
09-25-2006, 12:02 AM#8
Taur
maybe cast and then add aloc?
09-25-2006, 12:28 AM#9
Nubcookie
Hmm, just based the dummy spell off of something else. now it works, meh. Thanks though!
09-25-2006, 12:35 AM#10
DioD
just use w8 for coundition et buff from spell on unit