- Joined
- May 2, 2011
- Messages
- 1,351
VIdEO
Makes life easy for me
Makes life easy for me
-------- ------------------------------------------------------------------------------------------ --------
-------- ------------------ EXPLOSIVE BLAST SETUP ------------------------- --------
-------- ------------------------------------------------------------------------------------------ --------
-------- Hashtable (Don't touch this) --------
Hashtable - Create a hashtable
Set ExplosiveBlastTable = (Last created hashtable)
-------- ------------------------------------------------------------------------------------------ --------
-------- ------------------------------------------------------------------------------ --------
-------- DAMAGE --------
-------- Damage: determines the amount of damage EACH BLAST does. --------
-------- (Base + (PerLvl x Level of ability) + (PerCast x Casts in a row)) --------
Set ExplosiveBlast_DamageBase = 3.00
Set ExplosiveBlast_DamagePerLvl = 2.00
Set ExplosiveBlast_DamagePerCast = 1.00
-------- ------------------------------------------------------------------------------ --------
-------- Attack type: the type of damage the spell deals. Spells typically deal SPELL damage. Magic Immunity will protect from spell damage. --------
Set ExplosiveBlast_AttackType = Spells
-------- ------------------------------------------------------------------------------ --------
-------- MANA COST --------
-------- Mana Cost: EACH BLAST drains this amount of mana. --------
-------- (Base + (PerLvl x Level of ability) + (PerCast x Casts in a row)) --------
Set ExplosiveBlast_ManaCostBase = 4.00
Set ExplosiveBlast_ManaCostPerLvl = 3.00
Set ExplosiveBlast_ManaCostPerCast = 2.00
-------- ------------------------------------------------------------------------------ --------
-------- BLAST SETTINGS --------
-------- Blasts: number of explosions per cast. --------
-------- (Base + (PerLvl x Level of ability)) --------
Set ExplosiveBlast_BlastsBase = 2
Set ExplosiveBlast_BlastsPerLvl = 1
-------- ------------------------------------------------------------------------------ --------
-------- Blasts increment: how many explosions are added after the first cast, if the ability is cast consecutively. --------
-------- (Inc + (PerLvl x Level of ability)) --------
-------- (Leave both as 0, if you want to use the same calculation as above for all casts) --------
Set ExplosiveBlast_BlastsInc = 0
Set ExplosiveBlast_BlastsIncPerLvl = 0
-------- ------------------------------------------------------------------------------ --------
-------- Blast Interval: determines the time between each blast. --------
-------- (1.00 is one second) --------
Set ExplosiveBlast_BlastInterval = 1.00
-------- ------------------------------------------------------------------------------ --------
-------- Blast Delay: the amount of time before the first blast. --------
-------- (1.00 is one second) --------
Set ExplosiveBlast_Delay = 3.00
-------- ------------------------------------------------------------------------------ --------
-------- Reset delay: whether the delay starts again every time the spell is cast consecutively. --------
Set ExplosiveBlast_ResetDelay = True
-------- ------------------------------------------------------------------------------ --------
-------- Casts Max: the maximum amount of consecutive casts in a row. --------
Set ExplosiveBlast_CastsMax = 3
-------- ------------------------------------------------------------------------------ --------
-------- RANGE --------
-------- Radius: the range of how far the blasts will damage enemies. --------
-------- (Base + (PerLvl x Level of ability)) --------
Set ExplosiveBlast_RadiusBase = 300.00
Set ExplosiveBlast_RadiusPerLvl = 25.00
-------- ------------------------------------------------------------------------------ --------
-------- SPECIAL EFFECTS --------
-------- SFX: the special effects used for each event. CAST is shown when the ability is cast. ACTIVE is created when the ability is cast, but lasts the whole --------
-------- time the ability is active. BLAST is the effect of the explosion and NOMANA is shown when the Hero doesn't have enough mana. --------
Set ExplosiveBlast_SFXcast = Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl
Set ExplosiveBlast_SFXactive = Environment\SmallBuildingFire\SmallBuildingFire2.mdl
Set ExplosiveBlast_SFXblast = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Set ExplosiveBlast_SFXnomana = Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
-------- SCALE sets the size of the special effect of the blast. --------
-------- (1.00 = 100%) --------
Set ExplosiveBlast_SFXblastScale = 1.00
-------- ------------------------------------------------------------------------------ --------
Explosive Blast Targets Allowed

Events

Conditions


(AttackedUnit is alive) Equal to True


(AttackedUnit is A flying unit) Not equal to True


Or - Any (Conditions) are true



Conditions




(AttackedUnit belongs to an enemy of (Owner of CastingUnit)) Equal to True




(Owner of AttackedUnit) Equal to Neutral Passive

Actions


-------- ^ On the conditions above, set the targets you want to be damaged by the Explosive Blast --------


-------- !! AttackedUnit = the unit that is being damaged !! --------


-------- !! CastingUnit = the Hero casting the ability !! --------


-------- --------------------------------------------------------------------------------------------------------------- --------


-------- --------------------------------------------------------------------------------------------------------------- --------


-------- --------------------------------------------------------------------------------------------------------------- --------


-------- ---------- Do not touch the code below, unless you know what you're doing ----------- --------


-------- --------------------------------------------------------------------------------------------------------------- --------


Unit - Cause CastingUnit to damage AttackedUnit, dealing (ExplosiveBlast_DamageBase + ((ExplosiveBlast_DamagePerLvl x (Real((Level of Explosive Blast for CastingUnit)))) + (ExplosiveBlast_DamagePerCast x (Real((Load (Key casts) of (Key TempHandle) from ExplosiveBlastTable)))))) damage of attack type Spells and damage type Normal


-------- --------------------------------------------------------------------------------------------------------------- --------
Explosive Blast Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Explosive Blast

Actions


Set CastingUnit = (Triggering unit)


Set TempHandle = (Triggering unit)


Set ExplosiveBlast_Casts = (Load (Key casts) of (Key TempHandle) from ExplosiveBlastTable)


Set ExplosiveBlast_CurrentlyActive = (Load (Key currentlyActive) of (Key TempHandle) from ExplosiveBlastTable)


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



If - Conditions




ExplosiveBlast_Casts Less than ExplosiveBlast_CastsMax



Then - Actions




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





If - Conditions






ExplosiveBlast_ResetDelay Equal to True





Then - Actions






Hashtable - Save ExplosiveBlast_Delay as (Key delay) of (Key TempHandle) in ExplosiveBlastTable





Else - Actions






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







If - Conditions








ExplosiveBlast_CurrentlyActive Equal to False







Then - Actions








Hashtable - Save ExplosiveBlast_Delay as (Key delay) of (Key TempHandle) in ExplosiveBlastTable







Else - Actions




Hashtable - Save (ExplosiveBlast_Casts + 1) as (Key casts) of (Key TempHandle) in ExplosiveBlastTable




Set ExplosiveBlast_TempExplosions = (Load (Key explosions) of (Key TempHandle) from ExplosiveBlastTable)




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





If - Conditions






(ExplosiveBlast_BlastsInc + ExplosiveBlast_BlastsIncPerLvl) Greater than 0






ExplosiveBlast_CurrentlyActive Equal to True





Then - Actions






Hashtable - Save (ExplosiveBlast_BlastsInc + ((ExplosiveBlast_BlastsIncPerLvl x (Level of Explosive Blast for CastingUnit)) + ExplosiveBlast_TempExplosions)) as (Key explosions) of (Key TempHandle) in ExplosiveBlastTable





Else - Actions






Hashtable - Save (ExplosiveBlast_BlastsBase + ((ExplosiveBlast_BlastsPerLvl x (Level of Explosive Blast for CastingUnit)) + ExplosiveBlast_TempExplosions)) as (Key explosions) of (Key TempHandle) in ExplosiveBlastTable




Special Effect - Create a special effect attached to the origin of CastingUnit using ExplosiveBlast_SFXcast




Special Effect - Destroy (Last created special effect)




Special Effect - Destroy (Load (Key castSFX) of (Key TempHandle) in ExplosiveBlastTable)




Special Effect - Create a special effect attached to the chest of CastingUnit using ExplosiveBlast_SFXactive




Hashtable - Save Handle Of(Last created special effect) as (Key castSFX) of (Key TempHandle) in ExplosiveBlastTable




Unit Group - Add CastingUnit to ExplosiveBlastGroup



Else - Actions
Explosive Blast Periodic

Events


Time - Every 0.10 seconds of game time

Conditions

Actions


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



Loop - Actions




Set CastingUnit = (Picked unit)




Set TempHandle = (Picked unit)




Set ExplosiveBlast_TempDelay = (Load (Key delay) of (Key TempHandle) from ExplosiveBlastTable)




Set ExplosiveBlast_Explosions = (Load (Key explosions) of (Key TempHandle) from ExplosiveBlastTable)




Hashtable - Save True as (Key currentlyActive) of (Key TempHandle) in ExplosiveBlastTable




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





If - Conditions






ExplosiveBlast_TempDelay Greater than 0.00





Then - Actions






Hashtable - Save (ExplosiveBlast_TempDelay - 0.10) as (Key delay) of (Key TempHandle) in ExplosiveBlastTable





Else - Actions






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







If - Conditions








ExplosiveBlast_Explosions Greater than 0







Then - Actions








Hashtable - Save (ExplosiveBlast_Explosions - 1) as (Key explosions) of (Key TempHandle) in ExplosiveBlastTable








Hashtable - Save ExplosiveBlast_BlastInterval as (Key delay) of (Key TempHandle) in ExplosiveBlastTable








Set ExplosiveBlast_TempManaCost = (ExplosiveBlast_ManaCostBase + ((ExplosiveBlast_ManaCostPerLvl x (Real((Level of Explosive Blast for CastingUnit)))) + (ExplosiveBlast_ManaCostPerCast x (Real((Load (Key casts) of (Key TempHandle) from ExplosiveBlastTable))))))








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









If - Conditions










(Mana of CastingUnit) Greater than or equal to ExplosiveBlast_TempManaCost









Then - Actions










Unit - Set mana of CastingUnit to ((Mana of CastingUnit) - ExplosiveBlast_TempManaCost)










Set TempPoint = (Position of CastingUnit)










Special Effect - Create a special effect at TempPoint using ExplosiveBlast_SFXblast










Special Effect - Set Scale of (Last created special effect) to ExplosiveBlast_SFXblastScale










Special Effect - Destroy (Last created special effect)










Custom script: set bj_wantDestroyGroup = true










Unit Group - Pick every unit in (Units within (ExplosiveBlast_RadiusBase + (ExplosiveBlast_RadiusPerLvl x (Real((Level of Explosive Blast for CastingUnit))))) of TempPoint) and do (Actions)











Loop - Actions












Set AttackedUnit = (Picked unit)












Trigger - Run Explosive Blast Targets Allowed <gen> (checking conditions)










Custom script: call RemoveLocation(udg_TempPoint)









Else - Actions










Special Effect - Create a special effect attached to the origin of CastingUnit using ExplosiveBlast_SFXnomana










Special Effect - Destroy (Last created special effect)







Else - Actions








Special Effect - Destroy (Load (Key castSFX) of (Key TempHandle) in ExplosiveBlastTable)








Unit Group - Remove CastingUnit from ExplosiveBlastGroup








Hashtable - Clear all child hashtables of child (Key TempHandle) in ExplosiveBlastTable