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!
Spell Info:
Cast to bring 4,6,8 flaming fire ball from the sky to the ground.When the balls reach the ground they will explode and cause damage to units in 400 AOE of the balls.The units in the center will not be damaged but the units in the area of effect will be pushed outwards in order to damage them.1 random unit at the point at the explosions will be slowed.
Hint:Cast under the phoenix when it is surrounded by enemies which gives him advantage to attack and give disadvantage for melee enemies.
v-0.1
Uploaded here
v-0.2
Fixed the things that moderator mentioned(Index still not works)
Changed the variable names' prefix from FB to FPB cuz many spells can have FB prefixes
(Ability being cast) Equal to Flaming Phoenix Bombs
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FPB_Index_Listener Equal to 0
Then - Actions
Trigger - Turn on FB Loop <gen>
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FPB_Recycle_Size Greater than 0
Then - Actions
Set FPB_Recycle_Size = (FPB_Recycle_Size - 1)
Set FPB_Current_Index = FPB_Recycle_Container[FPB_Recycle_Size]
Else - Actions
Set FPB_Current_Index = FPB_Index_Size
Set FPB_Index_Size = (FPB_Index_Size + 1)
Set FPB_Caster[FPB_Current_Index] = (Triggering unit)
Set FPB_Player = (Owner of FPB_Caster[FPB_Current_Index])
Set FPB_Level = (Level of Flaming Phoenix Bombs for FPB_Caster[FPB_Current_Index])
Set FPB_TargetPoint[FPB_Current_Index] = (Target point of ability being cast)
Set FPB_Balls[FPB_Current_Index] = (FPB_Base_Balls + (FPB_BallsPerLevel x FPB_Level))
Set FPB_Damage = (FPB_BaseDamage + (FPB_DamagePerLevel x (Real(FPB_Level))))
For each (Integer FPB_Integer) from 1 to FPB_Balls[FPB_Current_Index], do (Actions)
Loop - Actions
Set FPB_SpawnPoint[FPB_Integer] = (FPB_TargetPoint[FPB_Current_Index] offset by FPB_StartDistance towards ((360.00 / (Real(FPB_Balls[FPB_Current_Index]))) x (Real(FPB_Integer))) degrees)
Set FPB_Height[FPB_Integer] = FPB_StartHeight
Unit - Create 1 Dummy for (Owner of FPB_Caster[FPB_Current_Index]) at FPB_SpawnPoint[FPB_Integer] facing Default building facing degrees
Special Effect - Create a special effect attached to the chest of FPB_Dummy[FPB_Integer] using FPB_Ball_Model
Special Effect - Create a special effect attached to the chest of FPB_Dummy[FPB_Integer] using FPB_Effect_Model
Animation - Change FPB_Dummy[FPB_Integer] flying height to FPB_Height[FPB_Integer] at 0.00
Animation - Change FPB_Dummy[FPB_Integer]'s size to (FPB_Size%, 0.00%, 0.00%) of its original size
Unit - Create 1 Dummy for (Owner of FPB_Caster[FPB_Current_Index]) at FPB_TargetPoint[FPB_Current_Index] facing Default building facing degrees
Set FPB_GroundEffect_Dummy[FPB_Current_Index] = (Last created unit)
Special Effect - Create a special effect attached to the origin of FPB_GroundEffect_Dummy[FPB_Current_Index] using FPB_GroundEffect_Model
Animation - Change FPB_GroundEffect_Dummy[FPB_Current_Index]'s size to (FPB_GroundDummy_Size%, 0.00%, 0.00%) of its original size
Set FPB_Index_Container[FPB_Index_Listener] = FPB_Current_Index
Set FPB_Index_Listener = (FPB_Index_Listener + 1)
FB Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer FPB_Loop) from 0 to (FPB_Index_Listener - 1), do (Actions)
Loop - Actions
Set FPB_Current_Index = FPB_Index_Container[FPB_Loop]
For each (Integer FPB_Integer) from 1 to FPB_Balls[FPB_Current_Index], do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FPB_Height[FPB_Integer] Greater than 0.00
Then - Actions
Set FPB_Height[FPB_Integer] = (FPB_Height[FPB_Integer] - FPB_Fall_Speed)
Set FPB_DummyPoint[FPB_Integer] = (Position of FPB_Dummy[FPB_Integer])
Set FPB_Angle[FPB_Integer] = (Angle from FPB_TargetPoint[FPB_Current_Index] to FPB_DummyPoint[FPB_Integer])
Set FPB_Distance[FPB_Integer] = (Distance between FPB_DummyPoint[FPB_Integer] and FPB_TargetPoint[FPB_Current_Index])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FPB_Angle[FPB_Integer] Greater than or equal to 360.00
Then - Actions
Set FPB_Angle[FPB_Integer] = 0.00
Else - Actions
Set FPB_Move[FPB_Integer] = (FPB_TargetPoint[FPB_Current_Index] offset by (FPB_Distance[FPB_Integer] + FPB_DistanceIncrease) towards (FPB_Angle[FPB_Integer] - FPB_SpinSpeed) degrees)
Animation - Change FPB_Dummy[FPB_Integer] flying height to FPB_Height[FPB_Integer] at 0.00
Unit - Move FPB_Dummy[FPB_Integer] instantly to FPB_Move[FPB_Integer], facing (FPB_Angle[FPB_Integer] - 90.00) degrees
For each (Integer FPB_Integer) from 1 to FPB_Balls[FPB_Current_Index], do (Actions)
Loop - Actions
Set FPB_DummyPoint[FPB_Integer] = (Position of FPB_Dummy[FPB_Integer])
Unit - Kill FPB_Dummy[FPB_Integer]
Unit - Kill FPB_GroundEffect_Dummy[FPB_Current_Index]
Special Effect - Create a special effect at FPB_DummyPoint[FPB_Integer] using FPB_Explode_Model
Unit - Create 1 Dummy for (Owner of FPB_Caster[FPB_Current_Index]) at FPB_DummyPoint[FPB_Integer] facing Default building facing degrees
Set FPB_Slow_Dummy = (Last created unit)
Unit - Add Flaming Bombs (Dummy) to FPB_Slow_Dummy
Unit - Set level of Flaming Bombs (Dummy) for FPB_Slow_Dummy to FPB_Level
Unit - Add a 1.00 second Generic expiration timer to FPB_Slow_Dummy
Set FPB_ExplodeGroup = (Units within FPB_ExplodePickRange of FPB_DummyPoint[FPB_Integer] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) belongs to an enemy of FPB_Player) Equal to Tru
Unit Group - Pick every unit in FPB_ExplodeGroup and do (Actions)
Loop - Actions
Set FPB_Picked_Unit[FPB_Integer] = (Picked unit)
Unit - Cause FPB_Caster[FPB_Current_Index] to damage FPB_Picked_Unit[FPB_Integer], dealing FPB_Damage damage of attack type Spells and damage type Normal
Unit - Order FPB_Slow_Dummy to Human Sorceress - Slow FPB_Picked_Unit[FPB_Integer]
Set FPB_Index_Container[FPB_Loop] = FPB_Index_Container[FPB_Index_Listener]
Set FPB_Recycle_Container[FPB_Recycle_Size] = FPB_Current_Index
Set FPB_Recycle_Size = (FPB_Recycle_Size + 1)
Set FPB_Loop = (FPB_Loop - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FPB_Index_Listener Equal to 0
Then - Actions
Trigger - Turn off FB Loop <gen>
Else - Actions
Set FPB_PushGroup[FPB_Current_Index] = (Units within FPB_PushPickRange of FPB_TargetPoint[FPB_Current_Index] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) belongs to an enemy of FPB_Player) Equal to
Unit Group - Pick every unit in FPB_PushGroup[FPB_Current_Index] and do (Actions)
Loop - Actions
Set FPB_PU_Picked_Unit[FPB_Current_Index] = (Picked unit)
Set FPB_PU_Picked_Position = (Position of FPB_PU_Picked_Unit[FPB_Current_Index])
Set FPB_PU_Angle = (Angle from FPB_TargetPoint[FPB_Current_Index] to FPB_PU_Picked_Position)
Set FPB_Push = (FPB_PU_Picked_Position offset by FPB_PushSpeed towards FPB_PU_Angle degrees)
Unit - Move FPB_PU_Picked_Unit[FPB_Current_Index] instantly to FPB_Push, facing Default building facing degrees
12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.
20:58, 2nd Nov 2012
Magtheridon96: First of all, I would like to commend you on the fact that you've improved. I'm going to attempt to improve myself by trying out a new format for my...
12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.
20:58, 2nd Nov 2012
Magtheridon96: First of all, I would like to commend you on the fact that you've improved. I'm going to attempt to improve myself by trying out a new format for my Moderator reviews. (Update: I have removed the solved points and updated this review accordingly)
Indexing
Since your indexing method isn't functional, you should check out Tank-Commander's indexing method, which happens to be /much/ simpler.
Leaks
You're leaking the following things:
All the special effects that are being created in your spell are not being removed. They should be stored into arrays so you can destroy them upon deallocating a spell instance (when the spell ends)
In your looping trigger, there is a loop in which you do this:
Custom script: call RemoveLocation(udg_FPB_TargetPoint[udg_FPB_Current_Index])
This line should be outside the loop because it runs more than once when you're destroying the spell instance. This means that you're removing the location more than once.
Efficiency
It would be more efficient to store the owner of the caster into a spell array variable so you don't have to constantly repeat the calls over and over again. Create a player array for storing the owner of the caster.
Is the spell non-MUI ?
And why you said the indexing does not work ?
You should use Tank-Commander's indexing method, CurrentIndex and MaxIndex, it should be easy.
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.