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!
Can someone help me with this.... It can be casted by multiple players at the same time....
A spell that when casted will create 3 arrows shot in 3 different lines (1 in the middle, 2 others in the left and right (30 degrees from the middle one)). The 3 arrows fly in their direction. When reached 2000 range, they will disappear. The 3 arrows also shot through the enemy units and only stop at 2000 range. Dealing agility*1.25 damage to the enemy that being shot through.
Note: My English is suck. Tks for reading my request.
Since the arrow only stops moving when it hits structures, terrain, or reaches its max travel distance, an arrow can deal damage multiple times to a single unit. As you can probably imagine, having a 0.03 loop timer will kill the unit almost instantly since it will deal damage every loop iteration. I don't know any possible fixes for it right now other than making the arrow stop when it collides with a unit.
VY Config
Events
Map initialization
Conditions
Actions
-------- CONFIG START --------
Set VY_Ability = Volley
Set VY_DummyUnit = Dummy
Set VY_MaxLevel = 3
-------- --------
Set VY_Damage[1] = 1.25
Set VY_Damage[2] = 1.25
Set VY_Damage[3] = 1.25
Set VY_MinimumHeight = 50.00
Set VY_TravelTime[1] = 1.00
Set VY_TravelTime[2] = 1.00
Set VY_TravelTime[3] = 1.00
Set VY_TravelDistance[1] = 1000.00
Set VY_TravelDistance[2] = 1000.00
Set VY_TravelDistance[3] = 1000.00
Set VY_AoE = 100.00
Set VY_ProjectileCount = 3
Set VY_AngleOffset = 30.00
Set VY_SpawnDistance = 75.00
-------- Special Effects --------
Set VY_SFXProjectile = Abilities\Weapons\MoonPriestessMissile\MoonPriestessMissile.mdl
Set VY_SFXProjectile_AP = chest
Set VY_SFXHit = Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Set VY_SFXHit_AP = chest
Set VY_SFXDeath = Abilities\Weapons\MakuraMissile\MakuraMissile.mdl
-------- CONFIG END --------
-------- --------
Set VY_AttackType = Pierce
Set VY_DamageType = Normal
Set VY_PeriodicTimer = 0.03
Trigger - Add to VY Loop <gen> the event (Time - Every VY_PeriodicTimer seconds of game time)
For each (Integer VY_LoopInt) from 1 to VY_MaxLevel, do (Actions)
Loop - Actions
Set VY_MoveRate[VY_LoopInt] = (VY_TravelDistance[VY_LoopInt] / (VY_TravelTime[VY_LoopInt] / VY_PeriodicTimer))
VY Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to VY_Ability
Actions
Set VY_SpellCount = (VY_SpellCount + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VY_SpellCount Equal to 1
Then - Actions
Trigger - Turn on VY Loop <gen>
Else - Actions
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VY_RecycledSize Equal to 0
Then - Actions
Set VY_MaxIndex = (VY_MaxIndex + 1)
Set VY_Spell_ID = VY_MaxIndex
Else - Actions
Set VY_RecycledSize = (VY_RecycledSize - 1)
Set VY_Spell_ID = VY_RecycledStack[VY_RecycledSize]
Set VY_NodeNext[VY_Spell_ID] = 0
Set VY_NodeNext[VY_NodePrev[0]] = VY_Spell_ID
Set VY_NodePrev[VY_Spell_ID] = VY_NodePrev[0]
Set VY_NodePrev[0] = VY_Spell_ID
-------- --------
Set VY_Caster[VY_Spell_ID] = (Triggering unit)
Set VY_Owner[VY_Spell_ID] = (Triggering player)
Set VY_AbilityLvl[VY_Spell_ID] = (Level of VY_Ability for VY_Caster[VY_Spell_ID])
Set VY_Count[VY_Spell_ID] = VY_ProjectileCount
-------- --------
Set VY_TempReal = (Real((Agility of VY_Caster[VY_Spell_ID] (Include bonuses))))
Set VY_Agility[VY_Spell_ID] = (VY_TempReal x VY_Damage[VY_AbilityLvl[VY_Spell_ID]])
-------- --------
Custom script: if udg_VY_ProjectileGroup[udg_VY_Spell_ID] == null then
Custom script: set udg_VY_ProjectileGroup[udg_VY_Spell_ID] = CreateGroup()
Custom script: endif
-------- --------
Set VY_TempLoc = (Position of VY_Caster[VY_Spell_ID])
Set VY_CurrentLoc = (Target point of ability being cast)
Set VY_TempReal = (Angle from VY_TempLoc to VY_CurrentLoc)
-------- dealing damage to units around projectile --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within VY_AoE of CP_Point) and do (Actions)
Loop - Actions
Set VY_TempUnit = (Picked unit)
Custom script: set udg_VY_TempReal = GetUnitFlyHeight(udg_VY_TempUnit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(VY_TempUnit is A structure) Equal to False
(VY_TempUnit is alive) Equal to True
(VY_TempUnit belongs to an enemy of VY_Owner[VY_Spell_ID]) Equal to True
VY_TempReal Less than or equal to VY_MinimumHeight
Then - Actions
Unit - Cause VY_Caster[VY_Spell_ID] to damage VY_TempUnit, dealing VY_Agility[VY_Spell_ID] damage of attack type VY_AttackType and damage type VY_DamageType
Special Effect - Create a special effect attached to the VY_SFXHit_AP of VY_TempUnit using VY_SFXHit
Special Effect - Destroy (Last created special effect)
Else - Actions
-------- TempUnit did not pass filters; do not deal damage --------
Custom script: call RemoveLocation(udg_CP_Point)
-------- checking if spell instance has any projectiles left --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Glad to hear it! I also wanted to state that I added an extra filter so that units with a fly height will not be damaged with the arrow, refer to the config variable VY_MinimumHeight to change it. The default value is 50, so that means any units that have a flying height greater than 50 will not be damaged.
Hey! I notice that when I set the number of arrows to 5 then it shots 5 arrows but only 1 arrow in the left, 1 in the middle and 3 in the right..... Can you make it to be balanced between the arrows ? Like when I set it to 1/3/5/7 then it will create 0/1/2/3 arrows in each side..... I'm really appreciate if you can do that.... tks for the extra filter and sorry for my bad English ^^
Since the arrow only stops moving when it hits structures, terrain, or reaches its max travel distance, an arrow can deal damage multiple times to a single unit. As you can probably imagine, having a 0.03 loop timer will kill the unit almost instantly since it will deal damage every loop iteration. I don't know any possible fixes for it right now other than making the arrow stop when it collides with a unit.
VY Config
Events
Map initialization
Conditions
Actions
-------- CONFIG START --------
Set VY_Ability = Volley
Set VY_DummyUnit = Dummy
Set VY_MaxLevel = 3
-------- --------
Set VY_Damage[1] = 1.25
Set VY_Damage[2] = 1.25
Set VY_Damage[3] = 1.25
Set VY_MinimumHeight = 50.00
Set VY_TravelTime[1] = 1.00
Set VY_TravelTime[2] = 1.00
Set VY_TravelTime[3] = 1.00
Set VY_TravelDistance[1] = 1000.00
Set VY_TravelDistance[2] = 1000.00
Set VY_TravelDistance[3] = 1000.00
Set VY_AoE = 100.00
Set VY_ProjectileCount = 3
Set VY_AngleOffset = 30.00
Set VY_SpawnDistance = 75.00
-------- Special Effects --------
Set VY_SFXProjectile = Abilities\Weapons\MoonPriestessMissile\MoonPriestessMissile.mdl
Set VY_SFXProjectile_AP = chest
Set VY_SFXHit = Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Set VY_SFXHit_AP = chest
Set VY_SFXDeath = Abilities\Weapons\MakuraMissile\MakuraMissile.mdl
-------- CONFIG END --------
-------- --------
Set VY_AttackType = Pierce
Set VY_DamageType = Normal
Set VY_PeriodicTimer = 0.03
Trigger - Add to VY Loop <gen> the event (Time - Every VY_PeriodicTimer seconds of game time)
For each (Integer VY_LoopInt) from 1 to VY_MaxLevel, do (Actions)
Loop - Actions
Set VY_MoveRate[VY_LoopInt] = (VY_TravelDistance[VY_LoopInt] / (VY_TravelTime[VY_LoopInt] / VY_PeriodicTimer))
VY Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to VY_Ability
Actions
Set VY_SpellCount = (VY_SpellCount + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VY_SpellCount Equal to 1
Then - Actions
Trigger - Turn on VY Loop <gen>
Else - Actions
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VY_RecycledSize Equal to 0
Then - Actions
Set VY_MaxIndex = (VY_MaxIndex + 1)
Set VY_Spell_ID = VY_MaxIndex
Else - Actions
Set VY_RecycledSize = (VY_RecycledSize - 1)
Set VY_Spell_ID = VY_RecycledStack[VY_RecycledSize]
Set VY_NodeNext[VY_Spell_ID] = 0
Set VY_NodeNext[VY_NodePrev[0]] = VY_Spell_ID
Set VY_NodePrev[VY_Spell_ID] = VY_NodePrev[0]
Set VY_NodePrev[0] = VY_Spell_ID
-------- --------
Set VY_Caster[VY_Spell_ID] = (Triggering unit)
Set VY_Owner[VY_Spell_ID] = (Triggering player)
Set VY_AbilityLvl[VY_Spell_ID] = (Level of VY_Ability for VY_Caster[VY_Spell_ID])
Set VY_Count[VY_Spell_ID] = VY_ProjectileCount
-------- --------
Set VY_TempReal = (Real((Agility of VY_Caster[VY_Spell_ID] (Include bonuses))))
Set VY_Agility[VY_Spell_ID] = (VY_TempReal x VY_Damage[VY_AbilityLvl[VY_Spell_ID]])
-------- --------
Custom script: if udg_VY_ProjectileGroup[udg_VY_Spell_ID] == null then
Custom script: set udg_VY_ProjectileGroup[udg_VY_Spell_ID] = CreateGroup()
Custom script: endif
-------- --------
Set VY_TempLoc = (Position of VY_Caster[VY_Spell_ID])
Set VY_CurrentLoc = (Target point of ability being cast)
Set VY_TempReal = (Angle from VY_TempLoc to VY_CurrentLoc)
-------- dealing damage to units around projectile --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within VY_AoE of CP_Point) and do (Actions)
Loop - Actions
Set VY_TempUnit = (Picked unit)
Custom script: set udg_VY_TempReal = GetUnitFlyHeight(udg_VY_TempUnit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(VY_TempUnit is A structure) Equal to False
(VY_TempUnit is alive) Equal to True
(VY_TempUnit belongs to an enemy of VY_Owner[VY_Spell_ID]) Equal to True
VY_TempReal Less than or equal to VY_MinimumHeight
Then - Actions
Unit - Cause VY_Caster[VY_Spell_ID] to damage VY_TempUnit, dealing VY_Agility[VY_Spell_ID] damage of attack type VY_AttackType and damage type VY_DamageType
Special Effect - Create a special effect attached to the VY_SFXHit_AP of VY_TempUnit using VY_SFXHit
Special Effect - Destroy (Last created special effect)
Else - Actions
-------- TempUnit did not pass filters; do not deal damage --------
Custom script: call RemoveLocation(udg_CP_Point)
-------- checking if spell instance has any projectiles left --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
For creating arrows like that you would just need to keep the facing of the unit and then in a ForLoop you would add up to the angle and keep multiplying it by -1. There might be some if conditions here and there, like if the integer is -1, don't add degrees to the angle.
Basically how you avoid the problem you have. This is how I do it.
Rough example of how to do it.[/QUOTE]
That would make it so that they don't take damage from any spell instance at all. The spell creates "3" arrows, so that would be a horrible solution. I guess what I could do is create a unit group specific to a dummy unit's custom value, but that's too much work for such a small mechanic.
[quote="svpforever, post: 2817538"]Hey! I notice that when I set the number of arrows to 5 then it shots 5 arrows but only 1 arrow in the left, 1 in the middle and 3 in the right..... Can you make it to be balanced between the arrows ?[/QUOTE]
Your original request only stated 3, so that's why it does that. I'm not really in the mood to work on that spell again, so hopefully you can find someone else to add the fix you need.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.