- Joined
- Jul 3, 2013
- Messages
- 25
Good people of the Hive, I am once again asking for your support.
First off, the situation: I'm trying to create a spell that summons a falling meteor that lands in target location, dealing damage.
I figured, hey, I could base this off of the summon Infernal spell, just need to set the Stun duration to 0.01 seconds. That worked decently well, if a little funky... but it's functional, and that's what mattered. After that, I just had to remove the model from the Infernal, make it invuln and magic immune, turn off its ability to attack, and throw in a generic expiration timer to clean it up. I didn't wanna add Locust in case it got weird with the "Summoned unit" trigger, but I could also do that instead.
To spice things up, I wanted to add INT scaling to the meteor's damage. This is what I ended up coming up with:
Data - Duration: 3
This is probably the duration of the summoned "Infernal" - methinks this is irrelevant since I have an expiration time, but I made it longer than the expiration timer just in case. I also tested this with no expiration timer and a Duration of 1.75, nothing seemed to change.
Data - Impact Delay: 1.2
Amount of time it takes for the meteor to fall. 1.2 felt like nice, but this can be changed as needed.
Stats - Buffs: Infernal
This is just the default buff, figured I didn't need to change this since the "Infernal" dies like 0.2 seconds after being summoned
Stats - Duration - Hero: 0.01
Stats - Duration - Normal: 0.01 <-- I figured the previous two only affect the stun duration; changing these numbers seemed to only affect that
The crux of the problem: Y'all might have already guessed it, but the triggered damage occurs on spell cast, not when the dummy Infernal is summoned. I figure that has something to do with the Infernal being already "summoned" as the projectile is falling, though I can't be sure. Adding a "Wait" is obviously not recommended, but I tried it anyway just in case. Of course, that didn't help at all.
My second instinct was to instead summon a dummy unit and make it cast war stomp or something after a Wait, but I thought I'd ask here first to see if y'all have a cleaner solution.
First off, the situation: I'm trying to create a spell that summons a falling meteor that lands in target location, dealing damage.
I figured, hey, I could base this off of the summon Infernal spell, just need to set the Stun duration to 0.01 seconds. That worked decently well, if a little funky... but it's functional, and that's what mattered. After that, I just had to remove the model from the Infernal, make it invuln and magic immune, turn off its ability to attack, and throw in a generic expiration timer to clean it up. I didn't wanna add Locust in case it got weird with the "Summoned unit" trigger, but I could also do that instead.
To spice things up, I wanted to add INT scaling to the meteor's damage. This is what I ended up coming up with:
-
Skyfall Trigger Test
-
Events
- Unit - A unit Spawns a summoned unit
-
Conditions
- (Unit-type of (Summoned unit)) Equal to Skyfall
-
Actions
- -------- Skyfall is a custom unit I created based off of the Infernal --------
- Set SkyfallCaster = (Summoning unit)
- Set SkyfallDeath = (Summoned unit)
- Unit - Add a 1.75 second Generic expiration timer to SkyfallDeath
- Set SkyfallArea = (Position of SkyfallDeath)
- Set SkyfallPick = (Units within 253.00 of SkyfallArea)
-
Unit Group - Pick every unit in SkyfallPick and do (Actions)
-
Loop - Actions
- Set SkyfallPick2 = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (SkyfallPick2 belongs to an enemy of (Owner of SkyfallCaster)) Equal to True
- (SkyfallPick2 is alive) Equal to True
- (SkyfallPick2 is A structure) Equal to False
- (SkyfallPick2 is Magic Immune) Equal to False
-
Then - Actions
- Unit - Cause SkyfallCaster to damage SkyfallPick2, dealing ((1.00 + (0.15 x (Real((Level of Skyfall (Abyss Mage) for SkyfallCaster))))) x (Real((Intelligence of SkyfallCaster (Include bonuses))))) damage of attack type Spells and damage type Magic
- Special Effect - Create a special effect attached to the origin of SkyfallPick2 using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: call RemoveLocation(udg_SkyfallArea)
- Custom script: call DestroyGroup(udg_SkyfallPick)
-
Events
Data - Duration: 3
This is probably the duration of the summoned "Infernal" - methinks this is irrelevant since I have an expiration time, but I made it longer than the expiration timer just in case. I also tested this with no expiration timer and a Duration of 1.75, nothing seemed to change.
Data - Impact Delay: 1.2
Amount of time it takes for the meteor to fall. 1.2 felt like nice, but this can be changed as needed.
Stats - Buffs: Infernal
This is just the default buff, figured I didn't need to change this since the "Infernal" dies like 0.2 seconds after being summoned
Stats - Duration - Hero: 0.01
Stats - Duration - Normal: 0.01 <-- I figured the previous two only affect the stun duration; changing these numbers seemed to only affect that
The crux of the problem: Y'all might have already guessed it, but the triggered damage occurs on spell cast, not when the dummy Infernal is summoned. I figure that has something to do with the Infernal being already "summoned" as the projectile is falling, though I can't be sure. Adding a "Wait" is obviously not recommended, but I tried it anyway just in case. Of course, that didn't help at all.
My second instinct was to instead summon a dummy unit and make it cast war stomp or something after a Wait, but I thought I'd ask here first to see if y'all have a cleaner solution.