- Joined
- Jul 23, 2009
- Messages
- 1,033
So I'm trying to make a fire bomb spell that works like Tiny's toss in dota.
When you finish channeling the ability, a fire bomb should be thrown from the caster toward the target location, flying higher into the air the closer it gets to the target location until it is halfway there. Then it is supposed to start falling to the ground so that it hits the ground at the target location.
I have tried as good as I can on my own but it usually just flies up to a random height, or starts falling too early and some times it won't even fly.
Please help, rep shall be given
When you finish channeling the ability, a fire bomb should be thrown from the caster toward the target location, flying higher into the air the closer it gets to the target location until it is halfway there. Then it is supposed to start falling to the ground so that it hits the ground at the target location.
I have tried as good as I can on my own but it usually just flies up to a random height, or starts falling too early and some times it won't even fly.
Please help, rep shall be given
-
Fire Bomb Channel Ended
-
Events
- Unit - A unit Stops casting an ability
-
Conditions
- (Ability being cast) Equal to (==) Spellbinder: Fire Bomb
-
Actions
-
Unit - Remove Unit_CastBar[(Player number of (Owner of (Triggering unit)))] from the game
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AB_TempCastTimer[(Player number of (Owner of (Triggering unit)))] Less than or equal to (<=) 0.00
-
Then - Actions
- Set AB_TempCasterPoint[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
- Unit - Create 1 Spellbinder: Missile Fire Bomb for (Owner of (Triggering unit)) at AB_TempCasterPoint[(Player number of (Owner of (Triggering unit)))] facing AB_TempPoint[(Player number of (Owner of (Triggering unit)))]
- Unit Group - Add (Last created unit) to AB_FireBombMissiles
- Unit Group - Add (Last created unit) to AB_FireBombRisingMissiles
- Set AB_FireBombMissile[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
- Unit - Order AB_FireBombMissile[(Player number of (Owner of (Triggering unit)))] to Move To AB_TempPoint[(Player number of (Owner of (Triggering unit)))]
- Set AB_FireBombDist[(Player number of (Owner of (Triggering unit)))] = (Distance between AB_TempCasterPoint[(Player number of (Owner of (Triggering unit)))] and AB_TempPoint[(Player number of (Owner of (Triggering unit)))])
- Set AB_FireBombTravelTimer[(Player number of (Owner of (Triggering unit)))] = (1.00 / (500.00 / AB_FireBombDist[(Player number of (Owner of (Triggering unit)))]))
- Animation - Change AB_FireBombMissile[(Player number of (Owner of (Triggering unit)))] flying height to 100000.00 at (200.00 x (500.00 / AB_FireBombDist[(Player number of (Owner of (Triggering unit)))]))
- Trigger - Turn on Fire Bomb Travel <gen>
- Trigger - Turn on Fire Bomb Gravity <gen>
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Unit Group - Remove (Triggering unit) from AB_TempCasters
-
Unit - Remove Unit_CastBar[(Player number of (Owner of (Triggering unit)))] from the game
-
Events
-
Fire Bomb Travel
-
Events
- Time - Every 0.50 seconds of game time
- Conditions
-
Actions
- Game - Display to (All players) the text: (String(AB_FireBombTravelTimer[1], 0, 0))
-
Unit Group - Pick every unit in AB_FireBombMissiles and do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AB_FireBombTravelTimer[(Player number of (Owner of (Picked unit)))] Greater than (>) 0.00
-
Then - Actions
- Set AB_FireBombTravelTimer[(Player number of (Owner of (Picked unit)))] = (AB_FireBombTravelTimer[(Player number of (Owner of (Picked unit)))] - 0.50)
-
Else - Actions
- Unit - Remove (Picked unit) from the game
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (AB_FireBombMissiles is empty) Equal to (==) True
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Events
-
Fire Bomb Gravity
-
Events
- Time - Every 0.50 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in AB_FireBombRisingMissiles and do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AB_FireBombTravelTimer[(Player number of (Owner of (Picked unit)))] Less than or equal to (<=) (AB_FireBombDist[(Player number of (Owner of (Picked unit)))] / 2.00)
-
Then - Actions
- Unit Group - Remove (Picked unit) from AB_FireBombRisingMissiles
- Animation - Change AB_FireBombMissile[(Player number of (Owner of (Picked unit)))] flying height to 0.00 at (200.00 x (500.00 / AB_FireBombDist[(Player number of (Owner of (Triggering unit)))]))
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in AB_FireBombRisingMissiles and do (Actions)
-
Events