- Joined
- Jan 30, 2016
- Messages
- 16
Help with a Spell [SOLVED]
Hello guys.I'd like to ask for help here,since i've been trying to fix that for a day and whatever i try,it doesn't works.Basically,i'm trying to make a spell that fires a fire ball (like the catapult atack).
The problem is that it doesn't change its height.
And yes,i checked if it's a flying unit.I am certain the problem is with the trigger,but i have no idea how to fix it
.
Hello guys.I'd like to ask for help here,since i've been trying to fix that for a day and whatever i try,it doesn't works.Basically,i'm trying to make a spell that fires a fire ball (like the catapult atack).
The problem is that it doesn't change its height.
And yes,i checked if it's a flying unit.I am certain the problem is with the trigger,but i have no idea how to fix it
-
Fire Ball
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to |cFFFFFF11Fire Ball|r
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




FB_Index[1] Equal to 0
-
-



Then - Actions
-




Trigger - Turn on Fire Ball Loop <gen>
-
-



Else - Actions
-
-


Set FB_Index[1] = (FB_Index[1] + 1)
-


Set FB_Index[2] = (FB_Index[2] + 1)
-


Set FB_On[FB_Index[2]] = True
-


Set FB_Caster[FB_Index[2]] = (Casting unit)
-


Set FB_Point[1] = (Position of FB_Caster[FB_Index[2]])
-


Set FB_Point[2] = (Target point of ability being cast)
-


Set FB_Distance[FB_Index[2]] = (Distance between FB_Point[1] and FB_Point[2])
-


Set FB_Facing[FB_Index[2]] = (Angle from FB_Point[1] to FB_Point[2])
-


Set FB_Offset[FB_Index[2]] = 20.00
-


Set FB_MidDistance[FB_Index[2]] = ((FB_Distance[FB_Index[2]] / 2.00) - 30.00)
-


Set FB_AreaofDamage[FB_Index[2]] = (200.00 + (20.00 x (Real((Level of |cFFFFFF11Fire Ball|r for FB_Caster[FB_Index[2]])))))
-


Set FB_Size[FB_Index[2]] = (40.00 + (6.00 x (Real((Level of |cFFFFFF11Fire Ball|r for FB_Caster[FB_Index[2]])))))
-


Set FB_Height[FB_Index[2]] = 30.00
-


Set FB_Damage[FB_Index[2]] = ((20.00 x (Real((Level of |cFFFFFF11Fire Ball|r for FB_Caster[FB_Index[2]])))) + ((Real((Level of |cFFFFFF11Fire Ball|r for FB_Caster[FB_Index[2]]))) x (0.50 x (Real((Intelligence of FB_Caster[FB_Index[2]] (Include bonuses)))))))
-


Unit - Create 1 Dummy for (Owner of FB_Caster[FB_Index[2]]) at FB_Point[1] facing FB_Facing[FB_Index[2]] degrees
-


Set FB_Dummy[FB_Index[2]] = (Last created unit)
-


Special Effect - Create a special effect attached to the chest of FB_Dummy[FB_Index[2]] using GreatElderHydraMoltenBreathV.196.mdx
-


Set FB_Effect[FB_Index[2]] = (Last created special effect)
-


Animation - Change FB_Dummy[FB_Index[2]]'s size to (FB_Size[FB_Index[2]]%, FB_Size[FB_Index[2]]%, FB_Size[FB_Index[2]]%) of its original size
-


Animation - Change FB_Dummy[FB_Index[2]] flying height to FB_Height[FB_Index[2]] at 0.00
-


Custom script: call RemoveLocation ( udg_FB_Point[1])
-


Custom script: call RemoveLocation ( udg_FB_Point[2])
-
-
-
Fire Ball Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer FB_Index[3]) from 1 to FB_Index[2], do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






FB_On[FB_Index[3]] Equal to True
-
-





Then - Actions
-






Set FB_Point[3] = (Position of FB_Dummy[FB_Index[3]])
-






Set FB_Point[4] = (FB_Point[3] offset by FB_Offset[FB_Index[3]] towards FB_Facing[FB_Index[3]] degrees)
-






Unit - Move FB_Dummy[FB_Index[3]] instantly to FB_Point[4]
-






Set FB_Distance[FB_Index[3]] = (FB_Distance[FB_Index[3]] - FB_Offset[FB_Index[3]])
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








FB_Distance[FB_Index[3]] Less than or equal to 0.00
-
-







Then - Actions
-








Set FB_Group = (Units within FB_AreaofDamage[FB_Index[3]] of FB_Point[4] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is A flying unit) Equal to False)) and ((((Matching unit) is dead) Equal to False) and (((Matching unit) belongs to an
-








Unit Group - Pick every unit in FB_Group and do (Actions)
-









Loop - Actions
-










Unit - Cause FB_Caster[FB_Index[3]] to damage (Matching unit), dealing FB_Damage[FB_Index[3]] damage of attack type Spells and damage type Lightning
-










Special Effect - Create a special effect attached to the chest of (Matching unit) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
-
-
-








Unit - Kill FB_Dummy[FB_Index[3]]
-








Special Effect - Destroy FB_Effect[FB_Index[3]]
-








Set FB_Index[1] = (FB_Index[1] - 1)
-








Custom script: call DestroyGroup ( udg_FB_Group)
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










FB_MidDistance[FB_Index[3]] Less than or equal to 0.00
-
-









Then - Actions
-










Set FB_Height[FB_Index[3]] = ((Current flying height of FB_Dummy[FB_Index[3]]) - 1.00)
-










Animation - Change FB_Dummy[FB_Index[3]] flying height to FB_Height[FB_Index[3]] at 0.00
-
-









Else - Actions
-










Set FB_Height[FB_Index[3]] = ((Current flying height of FB_Dummy[FB_Index[3]]) + 1.00)
-










Animation - Change FB_Dummy[FB_Index[3]] flying height to FB_Height[FB_Index[3]] at 0.00
-
-
-
-
-






Custom script: call RemoveLocation ( udg_FB_Point[3])
-






Custom script: call RemoveLocation ( udg_FB_Point[4])
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








FB_Index[1] Equal to 0
-
-







Then - Actions
-








Set FB_On[FB_Index[3]] = False
-








Set FB_Index[2] = 0
-








Trigger - Turn off (This trigger)
-
-







Else - Actions
-
-
-





Else - Actions
-
-
-
-
-
Last edited:







