- Joined
- Apr 21, 2013
- Messages
- 1,194
But i couldn't find where any help is appreciated. The dummy stops when second is cast.
-
FB Configuration
-
Events
- Map initialization
- Conditions
-
Actions
- -------- Setting the ability ID --------
- Set FB_AbilityID = Fire Ball
- -------- set the effect --------
- Set FB_SPC1 = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
- -------- Damage --------
- Set FB_Damage[1] = 100.00
- Set FB_Damage[2] = 150.00
- Set FB_Damage[3] = 250.00
- Set FB_Damage[4] = 400.00
- -------- AoE of FireBall --------
- Set FB_AoE[1] = 100.00
- Set FB_AoE[2] = 100.00
- Set FB_AoE[3] = 100.00
- Set FB_AoE[4] = 100.00
- -------- Max Distance of FireBall --------
- Set FB_MaxDistance = 1000.00
- -------- Speed of the ball --------
- Set FB_Speed = (1500.00 x 0.03)
- -------- ----------Creating the Peasant to harvest the trees---------- --------
- Custom script: set udg_FB_TreeDestroyer = CreateUnit (Player(15), 'hpea', 0,0,0)
- Custom script: call UnitAddAbility(udg_FB_TreeDestroyer, 'Aloc')
- Unit - Hide FB_TreeDestroyer
-
Events
-
FB Execution
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Fire Ball
-
Actions
- Set FB_Index = (FB_Index + 1)
- Set FB_Caster[FB_Index] = (Triggering unit)
- Set tempLoc1 = (Position of FB_Caster[FB_Index])
- Set tempLoc2 = (Target point of ability being cast)
- Set FB_Angle[FB_Index] = (Angle from tempLoc1 to tempLoc2)
- Unit - Create 1 FireballDummy for (Owner of FB_Caster[FB_Index]) at tempLoc1 facing FB_Angle[FB_Index] degrees
- Set FB_Dummy[FB_Index] = (Last created unit)
- Set FB_DistanceTravelled[FB_Index] = 0.00
- Custom script: set udg_FB_DamageGroup[udg_FB_Index] = CreateGroup()
- Custom script: call RemoveLocation(udg_tempLoc1)
- Custom script: call RemoveLocation(udg_tempLoc2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- FB_Index Equal to 1
-
Then - Actions
- Trigger - Turn on FB Loop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
FB Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer FB_LoopInteger) from 1 to FB_Index, do (Actions)
-
Loop - Actions
- Set tempLoc1 = (Position of FB_Dummy[FB_LoopInteger])
- Set tempLoc2 = (tempLoc1 offset by FB_Speed towards FB_Angle[FB_LoopInteger] degrees)
- Set FB_DistanceTravelled[FB_LoopInteger] = (FB_DistanceTravelled[FB_LoopInteger] + FB_Speed)
- Custom script: set bj_wantDestroyGroup = true
- Unit - Move FB_Dummy[FB_LoopInteger] instantly to tempLoc2
-
Unit Group - Pick every unit in (Units within FB_AoE[(Level of FB_AbilityID for FB_Caster[FB_LoopInteger])] of tempLoc2) and do (Actions)
-
Loop - Actions
- Set tempUnit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (tempUnit is alive) Equal to True
- (tempUnit is in FB_DamageGroup[FB_LoopInteger]) Equal to False
- (tempUnit belongs to an enemy of (Owner of FB_Caster[FB_LoopInteger])) Equal to True
-
Then - Actions
- Unit - Cause FB_Dummy[FB_LoopInteger] to damage tempUnit, dealing FB_Damage[(Level of FB_AbilityID for FB_Caster[FB_LoopInteger])] damage of attack type Pierce and damage type Fire
- Special Effect - Create a special effect at (Position of tempUnit) using FB_SPC1
- Special Effect - Destroy (Last created special effect)
- Unit - Hide FB_Dummy[FB_LoopInteger]
- Else - Actions
-
If - Conditions
- Unit Group - Add tempUnit to FB_DamageGroup[FB_LoopInteger]
-
Loop - Actions
-
Destructible - Pick every destructible within FB_AoE[(Level of FB_AbilityID for FB_Caster[FB_LoopInteger])] of tempLoc2 and do (Actions)
-
Loop - Actions
- Set tempDestructible = (Picked destructible)
- Unit - Order FB_TreeDestroyer to Harvest tempDestructible
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Current order of FB_TreeDestroyer) Equal to (Order(harvest))
-
Then - Actions
- Destructible - Kill tempDestructible
- Else - Actions
-
If - Conditions
- Unit - Order FB_TreeDestroyer to Stop
-
Loop - Actions
- Custom script: call RemoveLocation(udg_tempLoc1)
- Custom script: call RemoveLocation(udg_tempLoc2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- FB_DistanceTravelled[FB_LoopInteger] Greater than or equal to FB_MaxDistance
-
Then - Actions
- Unit - Kill FB_Dummy[FB_LoopInteger]
- Set FB_Angle[FB_LoopInteger] = FB_Angle[FB_Index]
- Set FB_Caster[FB_LoopInteger] = FB_Caster[FB_Index]
- Set FB_Dummy[FB_LoopInteger] = FB_Dummy[FB_Index]
- Set FB_DamageGroup[FB_LoopInteger] = FB_DamageGroup[FB_Index]
- Set FB_DistanceTravelled[FB_LoopInteger] = FB_DistanceTravelled[FB_Index]
- Set FB_Index = (FB_Index - 1)
- Set FB_LoopInteger = (FB_LoopInteger - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CM_Index Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer FB_LoopInteger) from 1 to FB_Index, do (Actions)
-
Events
Last edited: