Moderator
M
Moderator
22:21, 16th Jun 2010
Hanky:
Leakless, MUI and you even got a tooltip now. Fine enough for an approval.
Hanky:
Leakless, MUI and you even got a tooltip now. Fine enough for an approval.
Shock BombThe hero casts an explosive bomb at the targeted location. After 5 seconds the bomb will explode and deal 130 damage and slows for 50% last 2 seconds.
SB Start

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Shock Bomb

Actions


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



If - Conditions




SB Equal to 0



Then - Actions




Trigger - Turn on SB Loop <gen>



Else - Actions


Set SB = (SB + 1)


Set SB_Times = (SB_Times + 1)


Set SB_Boolean[SB_Times] = True


Set SB_Hero[SB_Times] = (Triggering unit)


Set SB_Damage[SB_Times] = 130.00


Set SB_Height[SB_Times] = 300.00


Set SB_Speed[SB_Times] = 30.00


Set SB_MaxScale[SB_Times] = 500.00


Set SB_CurrentScale[SB_Times] = 100.00


Set SB_AOE[SB_Times] = 500.00


Set SB_FTValue[SB_Times] = 5


Set SB_FT_Count[SB_Times] = 1.00


Set SB_TrgtPoint[SB_Times] = (Target point of ability being cast)


Set SB_Loc[1] = (Position of SB_Hero[SB_Times])


Set SB_MaxDistance[SB_Times] = (Distance between SB_Loc[1] and SB_TrgtPoint[SB_Times])


Set SB_Angle[SB_Times] = (Angle from SB_Loc[1] to SB_TrgtPoint[SB_Times])


Unit - Create 1 Flying Bomb for (Owner of SB_Hero[SB_Times]) at SB_Loc[1] facing SB_Angle[SB_Times] degrees


Set SB_Projectile[SB_Times] = (Last created unit)


Custom script: call RemoveLocation (udg_SB_Loc[1])


Custom script: call RemoveLocation (udg_SB_TrgtPoint[udg_SB_Times])
SB Loop

Events


Time - Every 0.02 seconds of game time

Conditions

Actions


For each (Integer SB_Loop) from 1 to SB_Times, do (Actions)



Loop - Actions




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





If - Conditions






SB_Boolean[SB_Loop] Equal to True





Then - Actions






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







If - Conditions








SB_DistanceCheck[SB_Loop] Less than SB_MaxDistance[SB_Loop]







Then - Actions








Set SB_DistanceCheck[SB_Loop] = (SB_DistanceCheck[SB_Loop] + SB_Speed[SB_Loop])








Set SB_Loc[2] = (Position of SB_Projectile[SB_Loop])








Set SB_Loc[3] = (SB_Loc[2] offset by SB_Speed[SB_Loop] towards SB_Angle[SB_Loop] degrees)








Unit - Move SB_Projectile[SB_Loop] instantly to SB_Loc[3]








Set SB_Parabola[SB_Loop] = (((4.00 x SB_Height[SB_Loop]) / SB_MaxDistance[SB_Loop]) x ((SB_MaxDistance[SB_Loop] - SB_DistanceCheck[SB_Loop]) x (SB_DistanceCheck[SB_Loop] / SB_MaxDistance[SB_Loop])))








Animation - Change SB_Projectile[SB_Loop] flying height to SB_Parabola[SB_Loop] at 0.00








Custom script: call RemoveLocation (udg_SB_Loc[2])








Custom script: call RemoveLocation (udg_SB_Loc[3])







Else - Actions








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









If - Conditions










SB_Bomb[SB_Loop] Equal to No unit









Then - Actions










Set SB_Loc[4] = (Position of SB_Projectile[SB_Loop])










Unit - Remove SB_Projectile[SB_Loop] from the game










Unit - Create 1 Bomb for (Owner of SB_Hero[SB_Loop]) at SB_Loc[4] facing (Random angle) degrees










Set SB_Bomb[SB_Loop] = (Last created unit)










Special Effect - Create a special effect attached to the origin of SB_Bomb[SB_Loop] using Abilities\Spells\Human\Brilliance\Brilliance.mdl










Set SB_SFX[SB_Loop] = (Last created special effect)










Custom script: call RemoveLocation (udg_SB_Loc[4])









Else - Actions










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











If - Conditions












SB_CurrentScale[SB_Loop] Less than SB_MaxScale[SB_Loop]











Then - Actions












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













If - Conditions














SB_FT_Count[SB_Loop] Equal to 1.00













Then - Actions














Floating Text - Create floating text that reads (String(SB_FTValue[SB_Loop])) above SB_Bomb[SB_Loop] with Z offset 10.00, using font size 20.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency














Floating Text - Change (Last created floating text): Disable permanence














Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds














Floating Text - Show (Last created floating text) for (All allies of (Owner of SB_Hero[SB_Loop]))














Set SB_FT_Count[SB_Loop] = 0.00














Set SB_FTValue[SB_Loop] = (SB_FTValue[SB_Loop] - 1)













Else - Actions














Set SB_FT_Count[SB_Loop] = (SB_FT_Count[SB_Loop] + 0.02)












Set SB_CurrentScale[SB_Loop] = (SB_CurrentScale[SB_Loop] + 1.60)












Animation - Change SB_Bomb[SB_Loop]'s size to (SB_CurrentScale[SB_Loop]%, SB_CurrentScale[SB_Loop]%, SB_CurrentScale[SB_Loop]%) of its original size











Else - Actions












Set SB_Loc[5] = (Position of SB_Bomb[SB_Loop])












Unit - Make SB_Bomb[SB_Loop] Explode on death












Special Effect - Destroy SB_SFX[SB_Loop]












Unit - Kill SB_Bomb[SB_Loop]












Unit - Create 1 Explosion for (Owner of SB_Hero[SB_Loop]) at SB_Loc[5] facing 0.00 degrees












Animation - Change (Last created unit)'s size to (200.00%, 200.00%, 200.00%) of its original size












Animation - Play (Last created unit)'s birth animation












Unit - Add a 7.17 second Generic expiration timer to (Last created unit)












Set SB_Group[1] = (Units within SB_AOE[SB_Loop] of SB_Loc[5] matching ((((Matching unit) belongs to an enemy of (Owner of SB_Hero[SB_Loop])) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching un












Unit Group - Pick every unit in SB_Group[1] and do (Actions)













Loop - Actions














Unit - Create 1 Dummy Unit for (Owner of SB_Hero[SB_Loop]) at SB_Loc[5] facing Default building facing degrees














Unit - Add Slow to (Last created unit)














Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)














Unit - Add a 3.00 second Generic expiration timer to (Last created unit)














Unit - Cause SB_Hero[SB_Loop] to damage (Picked unit), dealing SB_Damage[SB_Loop] damage of attack type Spells and damage type Normal












Destructible - Pick every destructible within SB_AOE[SB_Loop] of SB_Loc[5] and do (Actions)













Loop - Actions














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















If - Conditions
















((Picked destructible) is alive) Equal to True















Then - Actions
















Set SB_Loc[6] = (Position of (Picked destructible))
















Special Effect - Create a special effect at SB_Loc[6] using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
















Special Effect - Destroy (Last created special effect)
















Destructible - Kill (Picked destructible)
















Custom script: call RemoveLocation (udg_SB_Loc[6])















Else - Actions












Custom script: call RemoveLocation (udg_SB_Loc[5])












Custom script: call DestroyGroup (udg_SB_Group[1])












Set SB_CurrentScale[SB_Loop] = 0.00












Set SB_DistanceCheck[SB_Loop] = 0.00












Set SB_Bomb[SB_Loop] = No unit












Set SB_Boolean[SB_Loop] = False












Set SB = (SB - 1)












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













If - Conditions














SB Equal to 0













Then - Actions














Trigger - Turn off (This trigger)














Set SB_Times = 0













Else - Actions





Else - Actions