- Joined
- Jan 30, 2013
- Messages
- 12,758
Well, I have made an old spell back a few months ago, but haven't really gotten around it to do some tweaking and making it better.
I also attached the map, feel free to leave a feedback for me to improve it before I upload it to Spell Section.
Planned Modifications :
Use X/Y Reals instead of Locations
Find a better way for enumeration check to stop trigger execution if no unit in group
Add New Features and stuff
Updates :
15 October 2013 : Major Trigger Tweaking & Rebalance Damage - Update Test Map
14 October 2013 : Minor Trigger Tweaking - Update Test Map
-
Water Blast Init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- WARNING --------
-
-------- If there's too many knocked unit at once. --------
-
-------- the knock might get a bit messy and also will lead to unwanted lags. --------
-
-------- use it wisely. --------
-
-------- NOTES --------
-
-------- Knockback will automatically stop once it hits a tree [if DestroyTree is false] --------
-
-------- CONFIGURABLES --------
-
-------- Ability (set this to the correct one) --------
-
Set WB_Ability = Water Blast
-
-------- Special Effect (effect that appears on target point) --------
-
Set WB_Effect = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
-
-------- Blast Radius (how big is the radius of the blast take effects) --------
-
Set WB_Radius[1] = 500.00
-
Set WB_Radius[2] = 500.00
-
Set WB_Radius[3] = 500.00
-
-------- Damage Amount (Amount of damage dealt upon explosion) --------
-
Set WB_Damage[1] = 100.00
-
Set WB_Damage[2] = 200.00
-
Set WB_Damage[3] = 350.00
-
-------- Knockback Range (the range of the knockback) --------
-
Set WB_Knock[1] = 500.00
-
Set WB_Knock[2] = 500.00
-
Set WB_Knock[3] = 500.00
-
-------- Knockback Time (the time of knockback in seconds) --------
-
Set WB_KnockTime[1] = 1.00
-
Set WB_KnockTime[2] = 1.00
-
Set WB_KnockTime[3] = 1.00
-
-------- Knock Formula : Range X Time --------
-
-------- In this sample it's 500 X 2 = 1000 Range --------
-
-------- Set this if you want trees to be destroyed or not. --------
-
Set WB_DestroyTrees = True
-
-------- set this to True if you want trees to gain a Special Effect at it's position upon destroyed, only set the other variable to an effect if the first one set to true, leave this be if you don't destroy trees --------
-
Set WB_DestroyTreesEffect = True
-
Set WB_DestEffect = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
-
-------- You may try configurating this, but do it at risk! --------
-
Set WB_DurDecreaser = 0.04
-
-------- END CONFIGURABLES --------
-
Hashtable - Create a hashtable
-
Set WB_Hash = (Last created hashtable)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
WB_DestroyTrees Equal to (==) True
-
-
Then - Actions
-
Custom script: set udg_WB_DestKiller = CreateUnit(Player(15), 'hpea', 0, 0, 0)
-
Unit - Hide WB_DestKiller
-
-
Else - Actions
-
-
-
Trigger - Add to Water Blast Knock <gen> the event (Time - Every WB_DurDecreaser seconds of game time)
-
-
-
Water Blast Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to (==) WB_Ability
-
-
Actions
-
-------- You know what? skip this --------
-
Set WB_GroupAmount = (Number of units in WB_Knocked)
-
Set WB_CastUnit = (Triggering unit)
-
Set WB_Loc = (Target point of ability being cast)
-
Set WB_Level = (Level of WB_Ability for WB_CastUnit)
-
Special Effect - Create a special effect at WB_Loc using WB_Effect
-
Special Effect - Destroy (Last created special effect)
-
-------- Blast them all!! --------
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
WB_GroupAmount Equal to (==) 0
-
-
Then - Actions
-
Trigger - Turn on Water Blast Knock <gen>
-
-
Else - Actions
-
-
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within WB_Radius[WB_Level] of WB_Loc) and do (Actions)
-
Loop - Actions
-
Set WB_TempUnit = (Picked unit)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(WB_TempUnit is A structure) Equal to (==) False
-
(WB_TempUnit belongs to an enemy of (Triggering player)) Equal to (==) True
-
(WB_TempUnit is A flying unit) Equal to (==) False
-
-
Then - Actions
-
Set WB_Loc2 = (Position of WB_TempUnit)
-
Unit - Cause WB_CastUnit to damage WB_TempUnit, dealing WB_Damage[WB_Level] damage of attack type Spells and damage type Normal
-
Set WB_KAngle = (Angle from WB_Loc to WB_Loc2)
-
Set WB_KRange = (WB_Knock[WB_Level] x 0.04)
-
Set WB_KTime = WB_KnockTime[WB_Level]
-
Custom script: set udg_WB_KeyID = GetHandleId(udg_WB_TempUnit)
-
Hashtable - Save WB_KAngle as 0 of WB_KeyID in WB_Hash
-
Hashtable - Save WB_KRange as 1 of WB_KeyID in WB_Hash
-
Hashtable - Save WB_KTime as 2 of WB_KeyID in WB_Hash
-
Unit Group - Add (Picked unit) to WB_Knocked
-
Custom script: call RemoveLocation(udg_WB_Loc2)
-
-
Else - Actions
-
-
-
-
-
-------- how bout we just destroy those trees to ashes? DestroyTrees = True is needed --------
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
WB_DestroyTrees Equal to (==) True
-
-
Then - Actions
-
Destructible - Pick every destructible within WB_Radius[WB_Level] of WB_Loc and do (Actions)
-
Loop - Actions
-
Set WB_TempDest = (Picked destructible)
-
Unit - Order WB_DestKiller to Harvest WB_TempDest
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of WB_DestKiller) Equal to (==) (Order(harvest))
-
-
Then - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(WB_TempDest is alive) Equal to (==) True
-
WB_DestroyTreesEffect Equal to (==) True
-
-
Then - Actions
-
Set WB_DestPos = (Position of WB_TempDest)
-
Special Effect - Create a special effect at WB_DestPos using WB_DestEffect
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_WB_DestPos)
-
-
Else - Actions
-
-
Destructible - Kill WB_TempDest
-
-
Else - Actions
-
-
-
Unit - Order WB_DestKiller to Stop
-
-
-
-
Else - Actions
-
-
-
Custom script: call RemoveLocation(udg_WB_Loc)
-
-
-
Water Blast Knock
-
Events
-
Conditions
-
Actions
-
Unit Group - Pick every unit in WB_Knocked and do (Actions)
-
Loop - Actions
-
Set WB_GroupAmount = (Number of units in WB_Knocked)
-
Set WB_TempUnit = (Picked unit)
-
Custom script: set udg_WB_KeyID = GetHandleId(udg_WB_TempUnit)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(WB_TempUnit is alive) Equal to (==) True
-
-
Then - Actions
-
Set WB_KAngle = (Load 0 of WB_KeyID from WB_Hash)
-
Set WB_KRange = (Load 1 of WB_KeyID from WB_Hash)
-
Set WB_KTime = (Load 2 of WB_KeyID from WB_Hash)
-
Set WB_Loc = (Position of WB_TempUnit)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
WB_KTime Greater than (>) 0.00
-
-
Then - Actions
-
Set WB_Loc2 = (WB_Loc offset by WB_KRange towards WB_KAngle degrees)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
WB_DestroyTrees Equal to (==) True
-
-
Then - Actions
-
Destructible - Pick every destructible within 256.00 of WB_Loc2 and do (Actions)
-
Loop - Actions
-
Unit - Order WB_DestKiller to Harvest WB_TempDest
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of WB_DestKiller) Equal to (==) (Order(harvest))
-
-
Then - Actions
-
Set WB_TempDest = (Picked destructible)
-
Destructible - Kill WB_TempDest
-
-
Else - Actions
-
-
-
Unit - Order WB_DestKiller to Stop
-
-
-
-
Else - Actions
-
-
-
Unit - Move WB_TempUnit instantly to WB_Loc2
-
Custom script: call RemoveLocation(udg_WB_Loc2)
-
Hashtable - Save (WB_KTime - WB_DurDecreaser) as 2 of WB_KeyID in WB_Hash
-
-
Else - Actions
-
Hashtable - Clear all child hashtables of child WB_KeyID in WB_Hash
-
Unit Group - Remove WB_TempUnit from WB_Knocked
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
WB_GroupAmount Equal to (==) 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
-
-
Custom script: call RemoveLocation(udg_WB_Loc)
-
-
Else - Actions
-
Hashtable - Clear all child hashtables of child WB_KeyID in WB_Hash
-
Unit Group - Remove WB_TempUnit from WB_Knocked
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
WB_GroupAmount Equal to (==) 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
-
-
-
-
-
Planned Modifications :
Use X/Y Reals instead of Locations
Add New Features and stuff
Updates :
15 October 2013 : Major Trigger Tweaking & Rebalance Damage - Update Test Map
14 October 2013 : Minor Trigger Tweaking - Update Test Map
Attachments
Last edited: