Draphoelix
It's not the wintercold that's killing me
- Reaction score
- 132
Forgot to use Spell Prefix >.<
GUI
MUI
Lags at first cast
How to Implement:
Copy all the objects (Mountain King not necessary) then go to Preferances and check the box that says "copy unknown variables". Then copy the spell folder and paste it into you map. To prevent lag, order a unit to cast the spell in the first seconds.
Summon a magnetic orb towards the targeted location. If your Magneticm is positive, the orb will pull nearby units to it and then create a magnetic field that prevents units from getting in or out for 8 seconds. Units inside the field will also suffer 5 damage every second and another 5 damage for each units inside the field. If your magneticm is negative, it will push nearby units from it and then create a magnetic reacton that pulls units whitin 600 range to it and deal 200 damage.
Triggers
Screenshots
Pulling units
The magnetic field
Pushing units
Magnetic reaction
GUI
MUI
Lags at first cast
How to Implement:
Copy all the objects (Mountain King not necessary) then go to Preferances and check the box that says "copy unknown variables". Then copy the spell folder and paste it into you map. To prevent lag, order a unit to cast the spell in the first seconds.
Summon a magnetic orb towards the targeted location. If your Magneticm is positive, the orb will pull nearby units to it and then create a magnetic field that prevents units from getting in or out for 8 seconds. Units inside the field will also suffer 5 damage every second and another 5 damage for each units inside the field. If your magneticm is negative, it will push nearby units from it and then create a magnetic reacton that pulls units whitin 600 range to it and deal 200 damage.
Triggers
Code:
Add
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Magnetic Orb
Actions
Unit - Add Magneticm to (Triggering unit)
Code:
Magnetic Field
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Magnetic Orb
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
A_CV Less than 1000
Then - Actions
Set A_CV = (A_CV + 1)
Else - Actions
Set A_CV = 1
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Magneticm for (Triggering unit)) Equal to 1
Then - Actions
Set Check[A_CV] = 180.00
Else - Actions
Set Check[A_CV] = 0.00
Set Point[A_CV] = (Position of (Triggering unit))
Set LT[A_CV] = (Target point of ability being cast)
Set Angle[A_CV] = (Angle from Point[A_CV] to LT[A_CV])
Set Loc[A_CV] = ((Position of (Triggering unit)) offset by 50.00 towards Angle[A_CV] degrees)
Unit - Create 1 Pulse for (Owner of (Triggering unit)) at Loc[A_CV] facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to A_CV
Unit - Turn collision for (Last created unit) Off
Set Pulse[A_CV] = (Last created unit)
Unit Group - Add (Last created unit) to Pulse_Group
Code:
Push
Events
Time - Every 0.05 seconds of game time
Conditions
(Number of units in Pulse_Group) Greater than 0
Actions
Unit Group - Pick every unit in Pulse_Group and do (Actions)
Loop - Actions
Set A_CV2 = (Custom value of (Picked unit))
Set Loc1[A_CV2] = (Position of Pulse[A_CV2])
Set Loc2[A_CV2] = (Loc1[A_CV2] offset by 20.00 towards Angle[A_CV2] degrees)
Unit - Move Pulse[A_CV2] instantly to Loc2[A_CV2]
Set Pulse_Group2 = (Units within 300.00 of Loc1[A_CV2] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Pulse[A_CV2])) Equal to True) and (((Matching unit) is alive) Equal to True))))
Unit Group - Pick every unit in Pulse_Group2 and do (Actions)
Loop - Actions
Unit - Turn collision for (Picked unit) Off
Set Pulse_Loc[A_CV2] = (Position of (Picked unit))
Set Pulse_Loc2[A_CV2] = (Pulse_Loc[A_CV2] offset by 20.00 towards ((Angle from Loc1[A_CV2] to Pulse_Loc[A_CV2]) - Check[A_CV2]) degrees)
Unit - Move (Picked unit) instantly to Pulse_Loc2[A_CV2]
Custom script: call RemoveLocation(udg_Pulse_Loc[udg_A_CV2])
Custom script: call RemoveLocation(udg_Pulse_Loc2[udg_A_CV2])
Unit - Turn collision for (Picked unit) On
Custom script: call DestroyGroup(udg_Pulse_Group2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between Loc1[A_CV2] and LT[A_CV2]) Less than or equal to 70.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Check[A_CV2] Equal to 180.00
Then - Actions
Unit - Create 1 Field for (Owner of Pulse[A_CV2]) at Loc2[A_CV2] facing Default building facing degrees
Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
Unit - Add DPS to (Last created unit)
Set Pulse_Group2 = (Units within 250.00 of Loc1[A_CV2] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Pulse[A_CV2])) Equal to True) and (((Matching unit) is alive) Equal to True))))
Unit - Set level of DPS for (Last created unit) to (Number of units in Pulse_Group2)
Unit Group - Pick every unit in Pulse_Group2 and do (Actions)
Loop - Actions
Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
Animation - Change (Last created unit)'s animation speed to 20.00% of its original speed
For each (Integer A) from 1 to 24, do (Actions)
Loop - Actions
Set Degrees[A_CV2] = (Degrees[A_CV2] + 15.00)
Set LT[A_CV2] = (Loc2[A_CV2] offset by 300.00 towards Degrees[A_CV2] degrees)
Unit - Create 1 Dummy for (Owner of Pulse[A_CV2]) at LT[A_CV2] facing (Angle from Loc2[A_CV2] to LT[A_CV2]) degrees
Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
Unit - Turn collision for (Last created unit) Off
Environment - Set terrain pathing at LT[A_CV2] of type Walkability to Off
Custom script: call RemoveLocation(udg_LT[udg_A_CV2])
Custom script: call DestroyGroup(udg_Pulse_Group2)
Unit - Kill Pulse[A_CV2]
Unit Group - Remove Pulse[A_CV2] from Pulse_Group
Else - Actions
Set Pulse_Group2 = (Units within 600.00 of Loc1[A_CV2] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Pulse[A_CV2])) Equal to True) and (((Matching unit) is alive) Equal to True))))
Unit Group - Pick every unit in Pulse_Group2 and do (Actions)
Loop - Actions
Unit - Turn collision for (Picked unit) Off
Unit - Move (Picked unit) instantly to Loc2[A_CV2]
Unit - Cause Pulse[A_CV2] to damage (Picked unit), dealing 200.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at Loc2[A_CV2] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Unit - Kill Pulse[A_CV2]
Unit Group - Remove Pulse[A_CV2] from Pulse_Group
Unit - Turn collision for (Picked unit) On
Custom script: call DestroyGroup(udg_Pulse_Group2)
Custom script: call RemoveLocation(udg_LT[udg_A_CV2])
Custom script: call RemoveLocation(udg_Loc2[udg_A_CV2])
Else - Actions
Custom script: call RemoveLocation(udg_Loc1[udg_A_CV2])
Custom script: call RemoveLocation(udg_Loc2[udg_A_CV2])
Code:
Toggle
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Magneticm
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Magneticm for (Triggering unit)) Equal to 1
Then - Actions
Unit - Increase level of Magneticm for (Triggering unit)
Else - Actions
Unit - Decrease level of Magneticm for (Triggering unit)
Code:
Walk
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Dummy
Actions
Set Die_Loc = (Position of (Triggering unit))
Environment - Set terrain pathing at Die_Loc of type Walkability to On
Custom script: call RemoveLocation(udg_Die_Loc)
Screenshots
Pulling units
The magnetic field
Pushing units
Magnetic reaction