- Joined
- May 15, 2013
- Messages
- 3,782
Hello Hivers, I'm working on another spell, this one in particular is kinda like in Dota's Lich Last Skill, that bouncy ice thing that hits enemies. Now, this one's base spell is a Firebolt, once cast, waiting until it hits the target, will hit another random enemy unit within the range of 800, has four bounces.
Problem is; the waiting. I kinda think there is some sort of math in calculating or converting the distance between the caster and the enemy into seconds. But I have no idea how? Anybody can help?
Problem is; the waiting. I kinda think there is some sort of math in calculating or converting the distance between the caster and the enemy into seconds. But I have no idea how? Anybody can help?
-
FB Set
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Frostbite
-
Actions
- Set FB_Caster = (Casting unit)
- Set FB_Targets[1] = (Target unit of ability being cast)
- Set FB_Position[1] = (Position of FB_Targets[1])
- Set FB_Damage = 400.00
- Wait 1.00 seconds
- Set FB_Targets[2] = (Random unit from (Units within 800.00 of FB_Position[1] matching ((((Matching unit) belongs to an enemy of (Owner of FB_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to FB_Targets[2])))))
- Set FB_Position[2] = (Position of FB_Targets[2])
- Unit - Create 1 Dummy (Frostbite Caster) for (Owner of FB_Caster) at FB_Position[1] facing Default building facing degrees
- Set FB_Dummies[1] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order FB_Dummies[1] to Neutral - Firebolt FB_Targets[2]
- Unit - Create 1 Dummy (Frostbite Nova) for (Owner of FB_Caster) at FB_Position[1] facing Default building facing degrees
- Set FB_Dummies[2] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order FB_Dummies[2] to Undead Lich - Frost Nova FB_Targets[1]
- Unit - Cause FB_Caster to damage FB_Targets[1], dealing FB_Damage damage of attack type Spells and damage type Cold
- Wait 1.00 seconds
- Set FB_Targets[3] = (Random unit from (Units within 800.00 of FB_Position[2] matching ((((Matching unit) belongs to an enemy of (Owner of FB_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to FB_Targets[3])))))
- Set FB_Position[3] = (Position of FB_Targets[3])
- Unit - Create 1 Dummy (Frostbite Caster) for (Owner of FB_Caster) at FB_Position[2] facing Default building facing degrees
- Set FB_Dummies[3] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order FB_Dummies[3] to Neutral - Firebolt FB_Targets[3]
- Unit - Create 1 Dummy (Frostbite Nova) for (Owner of FB_Caster) at FB_Position[2] facing Default building facing degrees
- Set FB_Dummies[4] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order FB_Dummies[4] to Undead Lich - Frost Nova FB_Targets[2]
- Unit - Cause FB_Caster to damage FB_Targets[2], dealing (FB_Damage - 50.00) damage of attack type Spells and damage type Cold
- Wait 1.00 seconds
- Set FB_Targets[4] = (Random unit from (Units within 800.00 of FB_Position[3] matching ((((Matching unit) belongs to an enemy of (Owner of FB_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to FB_Targets[4])))))
- Set FB_Position[4] = (Position of FB_Targets[4])
- Unit - Create 1 Dummy (Frostbite Caster) for (Owner of FB_Caster) at FB_Position[3] facing Default building facing degrees
- Set FB_Dummies[5] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order FB_Dummies[5] to Neutral - Firebolt FB_Targets[4]
- Unit - Create 1 Dummy (Frostbite Nova) for (Owner of FB_Caster) at FB_Position[3] facing Default building facing degrees
- Set FB_Dummies[6] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order FB_Dummies[6] to Undead Lich - Frost Nova FB_Targets[3]
- Unit - Cause FB_Caster to damage FB_Targets[3], dealing (FB_Damage - 100.00) damage of attack type Spells and damage type Cold
- Wait 1.00 seconds
- Set FB_Targets[5] = (Random unit from (Units within 800.00 of FB_Position[4] matching ((((Matching unit) belongs to an enemy of (Owner of FB_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to FB_Targets[5])))))
- Set FB_Position[5] = (Position of FB_Targets[5])
- Unit - Create 1 Dummy (Frostbite Caster) for (Owner of FB_Caster) at FB_Position[4] facing Default building facing degrees
- Set FB_Dummies[7] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order FB_Dummies[7] to Neutral - Firebolt FB_Targets[5]
- Unit - Create 1 Dummy (Frostbite Nova) for (Owner of FB_Caster) at FB_Position[4] facing Default building facing degrees
- Set FB_Dummies[8] = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Order FB_Dummies[8] to Undead Lich - Frost Nova FB_Targets[4]
- Unit - Cause FB_Caster to damage FB_Targets[4], dealing (FB_Damage - 150.00) damage of attack type Spells and damage type Cold
- Wait 1.00 seconds
- Unit - Cause FB_Caster to damage FB_Targets[5], dealing (FB_Damage - 200.00) damage of attack type Spells and damage type Cold
- Custom script: call RemoveLocation(udg_FB_Position[1])
- Custom script: call RemoveLocation(udg_FB_Position[2])
- Custom script: call RemoveLocation(udg_FB_Position[3])
- Custom script: call RemoveLocation(udg_FB_Position[4])
- Custom script: call RemoveLocation(udg_FB_Position[5])
-
Events