Moderator
M
Moderator
19:02, 12th Jul 2010
TriggerHappy:
You've updated everything I've asked.
TriggerHappy:
You've updated everything I've asked.
Sinister Blast Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Sinister Blast

Actions


-------- Stores Caster and Target into variables --------


Set Caster = (Triggering unit)


Set Target = (Target unit of ability being cast)


-------- Finds location of Target --------


Set Points[1] = (Position of Target)


-------- Counts the Sins to release --------


-------- NOTE 1: Set your Sins here --------


Set Integer = (2 + (Level of Sinister Blast for Caster))


-------- Prepares variable for angle determination which will be the starting angle to spin for Sin --------


Set Real[1] = 0.00


-------- Counts up the Angle by which the angle-to-spin will be increased with every Sin risen --------


Set Real[2] = (360.00 / (Real(Integer)))


-------- Stores damage into Variable --------


-------- NOTE 2: Change your damage here --------


Set Real[3] = 100.00


-------- Creates sins --------


For each (Integer A) from 1 to Integer, do (Actions)



Loop - Actions




-------- Creates the Sin it self --------




-------- NOTE 3: Change model of your 'sin' unit at the object editor at the dummy unit --------




Unit - Create 1 Dark Bolt for (Owner of Caster) at Points[1] facing Default building facing degrees




-------- Adds and removes Storm Crow spell to/from target, allowing us to manipulate the flying height of Sin --------




Unit - Add Storm Crow Form to (Last created unit)




Unit - Remove Storm Crow Form from (Last created unit)




-------- Instantly changes the Flying height of Sin to be equal of the Target's one --------




Animation - Change (Last created unit) flying height to (Current flying height of Target) at 0.00




-------- Makes the Sin rise over half second to the higher point at which it will spin for next second and half --------




Animation - Change (Last created unit) flying height to ((Current flying height of (Last created unit)) + 300.00) at 600.00




-------- Stores information needed into hashtable --------




-------- NOTE 4: All information is attached to the Sin unit --------




-------- These two store caster and target --------




Hashtable - Save Handle OfTarget as 0 of (Key (Last created unit)) in Hashtable




Hashtable - Save Handle OfCaster as 1 of (Key (Last created unit)) in Hashtable




-------- This one stores range from Target --------




Hashtable - Save 0.00 as 2 of (Key (Last created unit)) in Hashtable




-------- This stores Angle at which this unit will start spinning --------




Hashtable - Save Real[1] as 3 of (Key (Last created unit)) in Hashtable




-------- This stores Damage --------




Hashtable - Save Real[3] as 4 of (Key (Last created unit)) in Hashtable




-------- Checks if there is any Sin in effect of the Rising Trigger --------




-------- If not, turns Rising Trigger on --------




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





If - Conditions






(BoltsRising is empty) Equal to True





Then - Actions






Trigger - Turn on Sinister Blast Rise <gen>





Else - Actions




-------- Adds the Sin unit to Rising Sins' group --------




Unit Group - Add (Last created unit) to BoltsRising




-------- Increases the Starting Spin angle by the amount counted above --------




Set Real[1] = (Real[1] + Real[2])


-------- Clears the Leaks --------


Custom script: call RemoveLocation(udg_Points[1])
Sinister Blast Rise

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



Loop - Actions




-------- Loads Target only, as we don't need the Caster for this phase of the spell --------




Set Target = (Load 0 of (Key (Picked unit)) in Hashtable)




-------- Loads the Range from target and increases it, allowing us to get further --------




-------- NOTE 1: Increases the range at the speed of 3.84/0.03=128 units per second --------




Set Real[1] = (Load 2 of (Key (Picked unit)) from Hashtable)




Set Real[1] = (Real[1] + 3.84)




-------- Loads the angle and increases it, so counting the angle at which the Sin unit will be moved from Target --------




-------- NOTE 2: Spins at the speed of 5.5/0.03=183 degrees per second --------




-------- NOTE 3: Spins counter-clockwise. If the angle would be decreased instead of increasing, the sin would spin Clockwise --------




Set Real[2] = (Load 3 of (Key (Picked unit)) from Hashtable)




Set Real[2] = (Real[2] + 5.50)




-------- Finds the Location of Target and the Location at which the Sin unit will be moved --------




Set Points[1] = (Position of Target)




Set Points[2] = (Points[1] offset by Real[1] towards Real[2] degrees)




-------- Moves sin unit to the Points[2], making it slide --------




Unit - Move (Picked unit) instantly to Points[2]




-------- Updates the Range-from-Target and Angle-from-Target --------




Hashtable - Save Real[1] as 2 of (Key (Picked unit)) in Hashtable




Hashtable - Save Real[2] as 3 of (Key (Picked unit)) in Hashtable




-------- Checks if it is time to 'return' to the Target --------




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





If - Conditions






Real[1] Greater than or equal to 256.00





Then - Actions






-------- If it is, then decreases the flying height of Sin to the one of the Target --------






Animation - Change (Picked unit) flying height to (Current flying height of Target) at 300.00






-------- Removes the Sin from the Rising Sins' group --------






Unit Group - Remove (Picked unit) from BoltsRising






-------- Checks if there is any sin landing already --------






-------- If not, then turns the Landing trigger on --------






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







If - Conditions








(BoltsLanding is empty) Equal to True







Then - Actions








Trigger - Turn on Sinister Blast Land <gen>







Else - Actions






-------- Adds the Sin unit to the Landing Sins' group --------






Unit Group - Add (Picked unit) to BoltsLanding





Else - Actions




-------- Clears leaks --------




Custom script: call RemoveLocation(udg_Points[1])




Custom script: call RemoveLocation(udg_Points[2])


-------- Checks if there is any Rising Sin left after this loop --------


-------- If not, turns this trigger off --------


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



If - Conditions




(BoltsRising is empty) Equal to True



Then - Actions




Trigger - Turn off (This trigger)



Else - Actions
Sinister Blast Land

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



Loop - Actions




-------- Loads both Caster and Target as we will need Caster too for damaging the Target. --------




Set Target = (Load 0 of (Key (Picked unit)) in Hashtable)




Set Caster = (Load 1 of (Key (Picked unit)) in Hashtable)




-------- Loads the Range-from-Target and decreases it, making sin return to the Target --------




-------- NOTE 1: Sin returns at the speed of 7.68/0.03=256 units per second --------




Set Real[1] = (Load 2 of (Key (Picked unit)) from Hashtable)




Set Real[1] = (Real[1] - 7.68)




-------- Loads the Angle-from-Target and increases it, making it spin --------




-------- NOTE 2: My sin spins at the speed of 8/0.03=267 degrees per second --------




-------- NOTE 3: My sin spins Counter-Clockwise. If the angle-from-target was reduced instead of increasing, it would spin Clockwise --------




Set Real[2] = (Load 3 of (Key (Picked unit)) from Hashtable)




Set Real[2] = (Real[2] + 8.00)




-------- Finds the location of target and location at which the sin unit will be moved --------




Set Points[1] = (Position of Target)




Set Points[2] = (Points[1] offset by Real[1] towards Real[2] degrees)




-------- Moves Sin to the Points[2], making it return to target --------




Unit - Move (Picked unit) instantly to Points[2]




-------- Checks if it is time to deal damge for target --------




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





If - Conditions






Real[1] Less than or equal to 0.00





Then - Actions






-------- If it is, then it... --------






-------- Loasd the damage-to-deal --------






Set Real[1] = (Load 4 of (Key (Picked unit)) from Hashtable)






-------- Causes Caster do deal damage to Target --------






Unit - Cause Caster to damage Target, dealing Real[1] damage of attack type Spells and damage type Normal






-------- Plays the SFX on target and instantly destroys it, fixing the SFX leak --------






Special Effect - Create a special effect attached to the origin of Target using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl






Special Effect - Destroy (Last created special effect)






-------- Clears the Hashtable --------






Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable






-------- Removes Sin unit for Returning Sins' group --------






Unit Group - Remove (Picked unit) from BoltsRising






-------- Removes Sin from game --------






Unit - Remove (Picked unit) from the game





Else - Actions






-------- If not, then it... --------






-------- Updates the Range- and Angle-from-target --------






Hashtable - Save Real[1] as 2 of (Key (Picked unit)) in Hashtable






Hashtable - Save Real[2] as 3 of (Key (Picked unit)) in Hashtable




-------- Clears the leaks --------




Custom script: call RemoveLocation(udg_Points[1])




Custom script: call RemoveLocation(udg_Points[2])


-------- Checks if there is any Returning Sin left after this loop --------


-------- If not, then turns this trigger off --------


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



If - Conditions




(BoltsLanding is empty) Equal to True



Then - Actions




Trigger - Turn off (This trigger)



Else - Actions