Moderator
M
Moderator
|
|
PD Configuration

Events


Timer - Elapsed game time is 0.00 seconds

Conditions

Actions


-------- Creating the Hashtable --------


Custom script: set udg_PD_Hashtable = InitHashtable( )


-------- Setting the ability --------


Set PD_Ability = Plasma dome


-------- Setting the lightningtype --------


Set PD_Lightning_Type = DRAL


-------- Setting the little orbs type --------


Set PD_Orbs_Type = Dummy (Plasma dome)


-------- Setting the big orb type --------


Set PD_Big_Orb_Type = Dummy 2 (Plasma dome)


-------- Setting the handle type --------


Set PD_Handle_Type = Handle (Plasma dome)


-------- Setting the starting height --------


Set PD_Starting_Height = 0.00


-------- Setting the max height --------


Set PD_Max_Height_Base = 200.00


Set PD_Max_Height_Level = 200.00


-------- Setting the how fast the height decrease --------


Set PD_Height_Decrease_Base = 10.00


Set PD_Height_Decrease_Level = 5.00


-------- Setting the how fast the dummies rotates --------


Set PD_Rotation_Base = 1.00


Set PD_Rotation_Level = 1.00


-------- Setting the how much the big orb grow --------


Set PD_Orb_Grow_Base = 1.00


Set PD_Orb_Grow_Level = 0.50


-------- Setting the distance between each little orb and the big one --------


Set PD_Distance_Base = 500.00


Set PD_Distance_Level = 250.00


-------- Setting effect of the increasing size of the big orb --------


Set PD_Grow_Effect = Abilities\Spells\NightElf\ManaBurn\ManaBurnTarget.mdl


-------- Setting how fast the orbs get closer to the big one --------


Set PD_Speed_Base = 5.00


Set PD_Speed_Level = 5.00


-------- Setting how much orbs there is --------


Set PD_Orbs_Amount_Base = 4


Set PD_Orbs_Amount_Level = 4


-------- Setting how much damages the orb does --------


Set PD_Damage_Base = 250.00


Set PD_Damage_Level = 100.00


-------- Setting how close of the orb an unit must be to get damaged --------


Set PD_Area_of_Effect_Base = 300.00


Set PD_Area_of_Effect_Level = 100.00


-------- Setting the attack-type of the spell --------


Set PD_Attack_Type = Sorts


-------- Setting the damage-type of the spell --------


Set PD_Damage_Type = Acide


-------- Setting the effect on the damaged units --------


Set PD_Damage_Effect = Abilities\Spells\Other\AcidBomb\BottleMissile.mdl


-------- Setting where the effect is attached to the units --------


Set PD_Damage_Attachement = overhead


-------- Setting the effect when the big one disappears --------


Set PD_End_Effect = Units\NightElf\Wisp\WispExplode.mdl


-------- Setting how often the growing effect appears --------


Set PD_Grow_Timer = 0.09


-------- Setting where it is located to the big one --------


Set PD_Grow_Attachement = chest
PD Cast

Events


Unit - A unit Initiate the effect of an ability

Conditions


(Ability being cast) Equal to PD_Ability

Actions


Set PD_TmpCaster = (Triggering unit)


Set PD_TmpPlayer = (Triggering player)


Set PD_TmpInteger = (Level of PD_Ability for PD_TmpCaster)


Set PD_TmpPoint = (Position of PD_TmpCaster)


Unit - Create 1 PD_Handle_Type for PD_TmpPlayer at PD_TmpPoint facing default building facing degrees


Set PD_TmpHandle = (Last created unit)


Unitgroup - Add (Last created unit) to PD_Group


Hashtable - Save Handle OfPD_TmpCaster as (Key Caster) of (Key PD_TmpHandle) in PD_Hashtable


Hashtable - Save Handle OfPD_TmpPlayer as (Key Owner) of (Key PD_TmpHandle) in PD_Hashtable


Hashtable - Save PD_TmpInteger as (Key Level) of (Key PD_TmpHandle) in PD_Hashtable


Custom script: call RemoveLocation( udg_PD_TmpPoint )


Set PD_TmpPoint = (Target point of ability being cast)


Unit - Create 1 PD_Big_Orb_Type for PD_TmpPlayer at PD_TmpPoint facing default building facing degrees


Hashtable - Save Handle Of(Last created unit) as (Key Big one) of (Key PD_TmpHandle) in PD_Hashtable


Set PD_TmpReal = (PD_Max_Height_Base + (PD_Max_Height_Level x (Real(PD_TmpInteger))))


Hashtable - Save PD_TmpReal as (Key Big one height) of (Key PD_TmpHandle) in PD_Hashtable


Animation - Change (Last created unit) flying height to PD_TmpReal at 0.00


Set PD_TmpReal = (PD_Distance_Base + (PD_Distance_Level x (Real(PD_TmpInteger))))


Hashtable - Save PD_TmpReal as (Key Distance) of (Key PD_TmpHandle) in PD_Hashtable


Set PD_TmpInteger2 = (PD_Orbs_Amount_Base + (PD_Orbs_Amount_Level x PD_TmpInteger))


Hashtable - Save PD_TmpInteger2 as (Key Amount) of (Key PD_TmpHandle) in PD_Hashtable


Set PD_TmpReal = (360.00 / (Real(PD_TmpInteger2)))


Set PD_TmpX = (X of PD_TmpPoint)


Set PD_TmpY = (Y of PD_TmpPoint)


Set PD_TmpReal2 = (Load (Key Big one height) of (Key PD_TmpHandle) from PD_Hashtable)


For each (Integer PD_Loop) from 1 to PD_TmpInteger2, do (Actions)



Loop - Actions




Set PD_TmpPoint2 = (PD_TmpPoint offset by (Load (Key Distance) of (Key PD_TmpHandle) from PD_Hashtable) towards PD_TmpReal degrees)




Set PD_TmpX2 = (X of PD_TmpPoint2)




Set PD_TmpY2 = (Y of PD_TmpPoint2)




Custom script: call SaveMyLightning( udg_PD_TmpX2, udg_PD_TmpY2, udg_PD_Starting_Height, udg_PD_TmpX, udg_PD_TmpY, udg_PD_TmpReal2 )




Hashtable - Save PD_TmpReal as PD_Loop of (Key PD_TmpHandle) in PD_Hashtable




Unit - Create 1 PD_Orbs_Type for PD_TmpPlayer at PD_TmpPoint2 facing default building facing degrees




Hashtable - Save Handle Of(Last created unit) as ((PD_Loop + PD_TmpInteger2) + 1) of (Key PD_TmpHandle) in PD_Hashtable




Custom script: call RemoveLocation( udg_PD_TmpPoint2 )




Set PD_TmpReal = (PD_TmpReal + (360.00 / (Real(PD_TmpInteger2))))


Custom script: call RemoveLocation( udg_PD_TmpPoint )


Set PD_TmpReal = (PD_Damage_Base + (PD_Damage_Level x (Real(PD_TmpInteger))))


Hashtable - Save PD_TmpReal as (Key Damage) of (Key PD_TmpHandle) in PD_Hashtable


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



If - Conditions




(Load (Key Big one height) of (Key PD_TmpHandle) from PD_Hashtable) Greater than 0.00



Then - Actions




Set PD_TmpReal = ((Load (Key Distance) of (Key PD_TmpHandle) from PD_Hashtable) / (Load (Key Big one height) of (Key PD_TmpHandle) from PD_Hashtable))




Hashtable - Save PD_TmpReal as (Key Relation) of (Key PD_TmpHandle) in PD_Hashtable




Hashtable - Save TRUE as (Key Rise) of (Key PD_TmpHandle) in PD_Hashtable



Else - Actions




Hashtable - Save 1.00 as (Key Relation) of (Key PD_TmpHandle) in PD_Hashtable




Hashtable - Save FALSE as (Key Rise) of (Key PD_TmpHandle) in PD_Hashtable


Set PD_TmpReal = (PD_Height_Decrease_Base + (PD_Height_Decrease_Level x (Real(PD_TmpInteger))))


Hashtable - Save PD_TmpReal as (Key Decrease) of (Key PD_TmpHandle) in PD_Hashtable


Hashtable = (PD_Orb_Grow_Base + (PD_Orb_Grow_Level x (Real(PD_TmpInteger))))


Hashtable - Save PD_TmpReal as (Key Grow) of (Key PD_TmpHandle) in PD_Hashtable


Set PD_TmpReal = (PD_Speed_Base + (PD_Speed_Level x (Real(PD_TmpInteger))))


Hashtable - Save PD_TmpReal as (Key Speed) of (Key PD_TmpHandle) in PD_Hashtable


Set PD_TmpReal = (PD_Rotation_Base + (PD_Rotation_Level x (Real(PD_TmpInteger))))


Hashtable - Save PD_TmpReal as (Key Rotation) of (Key PD_TmpHandle) in PD_Hashtable


Hashtable - Save 100.00 as (Key Size) of (Key PD_TmpHandle) in PD_Hashtable


Hashtable - Save PD_Starting_Height as (Key Height) of (Key PD_TmpHandle) in PD_Hashtable


Hashtable - Save FALSE as (Key Destroy) of (Key PD_TmpHandle) in PD_Hashtable


Hashtable - Save PD_Grow_Timer as (Key Timer) of (Key PD_TmpHandle) in PD_Hashtable


Set PD_TmpReal = (PD_Area_of_Effect_Base + (PD_Area_of_Effect_Level x (Real(PD_TmpInteger))))


Hashtable - Save PD_TmpReal as (Key Area of effect) of (Key PD_TmpHandle) in PD_Hashtable


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



If - Conditions




(PD Loop <gen> is on) Equal to FALSE



Then - Actions




Trigger - Turn on PD Loop <gen>



Else - Actions
PD Loop

Events


Timer - Every 0.03 seconds of game time

Conditions

Actions


Unitgroup - Pick every unit in PD_Group and do (Actions)



Loop - Actions




Set PD_TmpHandle2 = (Picked unit)




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





If - Conditions






(Load (Key Distance) of (Key PD_TmpHandle2) from PD_Hashtable) Greater than 0.00





Then - Actions






Set PD_TmpReal = ((Load (Key Distance) of (Key PD_TmpHandle2) from PD_Hashtable) - (Load (Key Speed) of (Key PD_TmpHandle2) from PD_Hashtable))






Hashtable - Save PD_TmpReal as (Key Distance) of (Key PD_TmpHandle2) in PD_Hashtable






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







If - Conditions








(Load (Key Height) of (Key PD_TmpHandle2) from PD_Hashtable) Lesser than (Load (Key Big one height) of (Key PD_TmpHandle2) from PD_Hashtable)







Then - Actions








Set PD_TmpReal = ((Load (Key Height) of (Key PD_TmpHandle2) from PD_Hashtable) + ((Load (Key Speed) of (Key PD_TmpHandle2) from PD_Hashtable) / (Load (Key Relation) of (Key PD_TmpHandle2) from PD_Hashtable)))







Else - Actions








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









If - Conditions










(Load (Key Height) of (Key PD_TmpHandle2) from PD_Hashtable) Greater than (Load (Key Big one height) of (Key PD_TmpHandle2) from PD_Hashtable)









Then - Actions










Set PD_TmpReal = ((Load (Key Height) of (Key PD_TmpHandle2) from PD_Hashtable) - ((Load (Key Speed) of (Key PD_TmpHandle2) from PD_Hashtable) / (Load (Key Relation) of (Key PD_TmpHandle2) from PD_Hashtable)))









Else - Actions






Hashtable - Save PD_TmpReal as (Key Height) of (Key PD_TmpHandle2) in PD_Hashtable






Set PD_TmpPoint = (Position of (Load (Key Big one) of (Key PD_TmpHandle2) in PD_Hashtable))






Set PD_TmpX2 = (X of PD_TmpPoint)






Set PD_TmpY2 = (Y of PD_TmpPoint)






Set PD_TmpInteger = (Load (Key Amount) of (Key PD_TmpHandle2) from PD_Hashtable)






For each (Integer PD_Loop) from 1 to PD_TmpInteger, do (Actions)







Loop - Actions








Set PD_TmpReal = ((Load PD_Loop of (Key PD_TmpHandle2) from PD_Hashtable) + (Load (Key Rotation) of (Key PD_TmpHandle2) from PD_Hashtable))








Hashtable - Save PD_TmpReal as PD_Loop of (Key PD_TmpHandle2) in PD_Hashtable








Set PD_TmpPoint2 = (PD_TmpPoint offset by (Load (Key Distance) of (Key PD_TmpHandle2) from PD_Hashtable) towards PD_TmpReal degrees)








Set PD_TmpX = (X of PD_TmpPoint2)








Set PD_TmpY = (Y of PD_TmpPoint2)








Set PD_TmpReal2 = (Load (Key Height) of (Key PD_TmpHandle2) from PD_Hashtable)








Set PD_TmpReal = (Load (Key Big one height) of (Key PD_TmpHandle2) from PD_Hashtable)








Set PD_TmpUnit = (Load ((PD_Loop + PD_TmpInteger) + 1) of (Key PD_TmpHandle2) in PD_Hashtable)








Custom script: call MoveMyLightning( udg_PD_TmpX, udg_PD_TmpY, udg_PD_TmpReal2, udg_PD_TmpX2, udg_PD_TmpY2, udg_PD_TmpReal )








Custom script: call SetUnitX( udg_PD_TmpUnit, udg_PD_TmpX )








Custom script: call SetUnitY( udg_PD_TmpUnit, udg_PD_TmpY )








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









If - Conditions










(Load (Key Rise) of (Key PD_TmpHandle2) from PD_Hashtable) Equal to TRUE









Then - Actions










Animation - Change PD_TmpUnit flying height to (Load (Key Height) of (Key PD_TmpHandle2) from PD_Hashtable) at 0.00









Else - Actions






Set PD_TmpReal = ((Load (Key Size) of (Key PD_TmpHandle2) from PD_Hashtable) + (Load (Key Grow) of (Key PD_TmpHandle2) from PD_Hashtable))






Hashtable - Save PD_TmpReal as (Key Size) of (Key PD_TmpHandle2) in PD_Hashtable






Set PD_TmpUnit = (Load (Key Big one) of (Key PD_TmpHandle2) in PD_Hashtable)






Animation - Change PD_TmpUnit's size to (PD_TmpReal%, PD_TmpReal%, PD_TmpReal%) of its original size






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







If - Conditions








(Load (Key Timer) of (Key PD_TmpHandle2) from PD_Hashtable) Greater than 0.00







Then - Actions








Hashtable - Save ((Load (Key Timer) of (Key PD_TmpHandle2) from PD_Hashtable) - 0.03) as (Key Timer) of (Key PD_TmpHandle2) in PD_Hashtable







Else - Actions








Hashtable - Save PD_Grow_Timer as (Key Timer) of (Key PD_TmpHandle2) in PD_Hashtable








Special effect - Create a special effect attached to the PD_Grow_Attachement of PD_TmpUnit using PD_Grow_Effect








Special effect- Destroy (Last created special effect)





Else - Actions






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







If - Conditions








(Load (Key Destroy) of (Key PD_TmpHandle2) from PD_Hashtable) Equal to FALSE







Then - Actions








Hashtable - Save TRUE as (Key Destroy) of (Key PD_TmpHandle2) in PD_Hashtable








Set PD_TmpInteger2 = (Load (Key Amount) of (Key PD_TmpHandle2) from PD_Hashtable)








For each (Integer PD_Loop) from 1 to PD_TmpInteger2, do (Actions)









Loop - Actions










Unit - Remove (Load ((PD_Loop + PD_TmpInteger2) + 1) of (Key PD_TmpHandle2) in PD_Hashtable) from the game










Custom script: call DestroyLightning( LoadLightningHandle( udg_PD_Hashtable, GetHandleId( udg_PD_TmpHandle2 ), ( ( udg_PD_Loop + udg_PD_TmpInteger ) * 2 ) ) )







Else - Actions






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







If - Conditions








(Load (Key Big one height) of (Key PD_TmpHandle2) from PD_Hashtable) Greater than 20.00







Then - Actions








Set PD_TmpReal = ((Load (Key Big one height) of (Key PD_TmpHandle2) from PD_Hashtable) - (Load (Key Decrease) of (Key PD_TmpHandle2) from PD_Hashtable))








Hashtable - Save PD_TmpReal as (Key Big one height) of (Key PD_TmpHandle2) in PD_Hashtable








Set PD_TmpUnit = (Load (Key Big one) of (Key PD_TmpHandle2) in PD_Hashtable)








Animation - Change PD_TmpUnit flying height to (Load (Key Big one height) of (Key PD_TmpHandle2) from PD_Hashtable) at 0.00







Else - Actions








Set PD_TmpPoint = (Position of (Load (Key Big one) of (Key PD_TmpHandle2) in PD_Hashtable))








Custom script: set bj_wantDestroyGroup = true








Unitgroup - Pick every unit in (Units within (Load (Key Area of effect) of (Key PD_TmpHandle2) from PD_Hashtable) of PD_TmpPoint) and do (Actions)









Boucle - Actions










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











If - Conditions












((Picked unit) is a Ground unit) Equal to TRUE












((Picked unit) is Magic immune) Equal to FALSE












((Picked unit) is a Building) Equal to FALSE












((Picked unit) belongs to an enemy of (Load (Key Owner) of (Key PD_TmpHandle2) in PD_Hashtable)) Equal to TRUE












((Picked unit) is alive) Equal to TRUE











Then - Actions












Special effect - Create a special effect attached to the PD_Damage_Attachement of (Picked unit) using PD_Damage_Effect












Special effect - Destroy (Last created special effect)












Unit - Cause (Load (Key Caster) of (Key PD_TmpHandle2) in PD_Hashtable) to damage (Picked unit), dealing (Load (Key Damage) of (Key PD_TmpHandle2) from PD_Hashtable) damage of attack type PD_Attack_Type and damage type PD_Damage_Type











Else - Actions








Set PD_TmpX = (X of PD_TmpPoint)








Set PD_TmpY = (Y of PD_TmpPoint)








Custom script: call DestroyEffect( AddSpecialEffect( udg_PD_End_Effect, udg_PD_TmpX, udg_PD_TmpY ) )








Custom script: call RemoveLocation( udg_PD_TmpPoint )








Unit - Remove (Load (Key Big one) of (Key PD_TmpHandle2) in PD_Hashtable) from the game








Set PD_TmpUnit = (Picked unit)








Unitgroup - Remove PD_TmpUnit from PD_Group








Hashtable - Clear all child hashtables of child (Key PD_TmpHandle2) in PD_Hashtable








Unit - Remove PD_TmpUnit from the game








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









If - Conditions










(Number of units in PD_Group) Equal to 0









Then - Actions










Trigger - Turn off (This trigger)









Else - Actions
function SaveMyLightning takes real x1, real y1, real z1, real x2, real y2, real z2 returns nothing //x1 = dummy's x, y1 = dummy's y, z1 = starting height, x2 = Center's x, y2 = Center's y, z2 = maxheight
call SaveLightningHandle( udg_PD_Hashtable, GetHandleId(udg_PD_TmpHandle), ( ( udg_PD_Loop + udg_PD_TmpInteger2 ) * 2 ), AddLightningEx( udg_PD_Lightning_Type, true, x1, y1, z1, x2, y2, z2 ) )
endfunction
function MoveMyLightning takes real x1, real y1, real z1, real x2, real y2, real z2 returns nothing //x1 = dummies' x, y1 = dummies' y, z1 = dummies' height, x2 = Center's x, y2 = Center's y, z2 = maxheight
if LoadBoolean( udg_PD_Hashtable, GetHandleId( udg_PD_TmpHandle ), StringHash( "Rise" ) ) == true then
call MoveLightningEx( LoadLightningHandle( udg_PD_Hashtable, GetHandleId( udg_PD_TmpHandle2 ), ( ( udg_PD_Loop + udg_PD_TmpInteger ) * 2 ) ), true, x1, y1, (z1 + GetLocationZ( udg_PD_TmpPoint2 ) + 40.00 ), x2, y2, z2 )
else
call MoveLightningEx( LoadLightningHandle( udg_PD_Hashtable, GetHandleId( udg_PD_TmpHandle2 ), ( ( udg_PD_Loop + udg_PD_TmpInteger ) * 2 ) ), true, x1, y1, 0.00, x2, y2, z2 )
endif
endfunction
Credits: EarthNova model made by JetFangoInferno
Important: All Modifications should be done in the Configuration Trigger, each configuration is explained and elaborated.
How to Import/Install:
=Preparing for import=
Go to: File => Preferences => General => Check the box labelled ''Automatically create unknown variables while pasting trigger data''
=Speeding up import of object data-
Go to: Window => make sure the 'brush list' is unchecked =>
You can swap between the spell and your map.
=Main importing=
In order of importing: Copy --> Paste to your Map.
Object Data (OE) - Spell - Plasma Dome
Object Data (OE) - Unit - Handle( Plasma Dome ).
Object Data (OE) - Unit - Handle( Plasma Dome ).
Object Data (OE) - Unit - Handle( Plasma Dome ).
Map Header (MH) - Script - SaveMyLightning
Map Header (MH) - Script - MoveMyLightning
Trigger Data (TE) - Folder - Plasma Dome
* Notes:
Note #1: Make sure to Configure the " PD Configuration " trigger in the PD_Ability, PD_Handle_Type, PD_Orbs_Type, PD_Big_Orb_Type.
Note #5: ~~Enjoy!!!
=Modifying the spell=
All Modifications should be done in the Configuration Trigger, each configuration is explained and elaborated.