trigger_newb
Active Member
- Reaction score
- 3
Hi all, I've been having headaches trying to understand how to make a spell MUI/Leakless in GUI
This is just for fun so I know these spells wont lag me, but I want to know just for good practice and learning - how I can make these spells MUI. I've read lots of tutorials on them, but I still don't understand how to do so... Can someone walk me through on this one?
This first spell basically blinks your caster a distance forward and creates an effect inbetween.
This second spell is basically an built in blink, cleave attack, lifesteal into a regular units attack.
I've done what i can to try and cover up the leaks, but i still need help - on top of that I have no idea how to make them Multi Unit Instanceable. T-T can someone help me please?
This is just for fun so I know these spells wont lag me, but I want to know just for good practice and learning - how I can make these spells MUI. I've read lots of tutorials on them, but I still don't understand how to do so... Can someone walk me through on this one?
Code:
Spell 1
Surge Step Go
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Surge Step
Actions
Custom script: local unit u
Custom script: local effect p
Set ShadeEnd = ((Position of (Triggering unit)) offset by 500.00 towards (Facing of (Triggering unit)) degrees)
Set ShadeTransparency = 25.00
Set ShadeCaster = (Triggering unit)
Set ShadePoint = ((Position of ShadeCaster) offset by 250.00 towards (Facing of ShadeCaster) degrees)
Set ShadeLoc[0] = (Position of ShadeCaster)
Unit - Create 1 Shade for (Owner of (Triggering unit)) at ShadePoint facing (Facing of ShadeCaster) degrees
Set ShadeDummy = (Last created unit)
Custom script: set u = udg_ShadeDummy
Custom script: set udg_ShadeDummy = u
Special Effect - Create a special effect attached to the weapon of ShadeDummy using Abilities\Spells\Other\HealingSpray\HealBottleMissile.mdl
Set ShadeEffects[0] = (Last created special effect)
Custom script: set p = udg_ShadeEffects[0]
Custom script: set udg_ShadeEffects[0] = p
Special Effect - Create a special effect at ShadeLoc[0] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
Special Effect - Destroy (Last created special effect)
Animation - Play ShadeDummy's attack animation
Animation - Change ShadeDummy's vertex coloring to (0.00%, 0.00%, 0.00%) with ShadeTransparency% transparency
Set ShadeGroup[0] = (Units within 300.00 of (Position of ShadeDummy) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of ShadeCaster)) Equal to True)))
Unit Group - Pick every unit in ShadeGroup[0] and do (Actions)
Loop - Actions
Unit - Cause ShadeDummy to damage (Picked unit), dealing 250.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Other\Transmute\PileofGold.mdl
Special Effect - Destroy (Last created special effect)
Set ShadeGroup[1] = (Units within 250.00 of (Position of ShadeCaster) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of ShadeCaster)) Equal to True)))
Unit Group - Pick every unit in ShadeGroup[1] and do (Actions)
Loop - Actions
Unit - Cause ShadeDummy to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Other\Transmute\PileofGold.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call SetUnitX( udg_ShadeCaster, GetLocationX(udg_ShadeEnd) )
Custom script: call SetUnitY( udg_ShadeCaster, GetLocationY(udg_ShadeEnd) )
Countdown Timer - Start ShadeTimer[0] as a Repeating timer that will expire in 0.02 seconds
Wait 1.50 seconds
Custom script: call PauseTimer(udg_ShadeTimer[0])
Custom script: call RemoveLocation(udg_ShadeLoc[0])
Custom script: call RemoveLocation(udg_ShadePoint)
Custom script: call RemoveLocation(udg_ShadeEnd)
Custom script: call DestroyGroup (udg_ShadeGroup[0])
Custom script: call DestroyGroup (udg_ShadeGroup[1])
Custom script: call DestroyEffect (p)
Custom script: call RemoveUnit (u)
Custom script: set u = null
Custom script: set p = null
Surge Step Clean
Events
Time - ShadeTimer[0] expires
Conditions
Actions
Set ShadeTransparency = (ShadeTransparency + 1.00)
Animation - Change ShadeDummy's vertex coloring to (0.00%, 0.00%, 0.00%) with ShadeTransparency% transparency
This first spell basically blinks your caster a distance forward and creates an effect inbetween.
Code:
Spell 2
Spin Go
Events - Specific Unit takes damage,
Conditions
(Level of Assault Strike for (Damage source)) Greater than 0
Actions
Set SpinNer = (Damage source)
Set SpinTarget = (Triggering unit)
Set SpinPoint[0] = (Position of SpinNer)
Set SpinPoint[1] = ((Position of SpinTarget) offset by 100.00 towards (Random real number between 0.00 and 360.00) degrees)
Set SpinAOE = (Units within 225.00 of (Position of SpinTarget) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of SpinNer)) Equal to True) and ((Matching unit) Not equal to SpinTarget))))
Unit Group - Pick every unit in SpinAOE and do (Actions)
Loop - Actions
Set SpinAOEPicked = (Picked unit)
Unit - Cause SpinDummy to damage SpinAOEPicked, dealing (0.15 x (Damage taken)) damage of attack type Chaos and damage type Normal
Special Effect - Create a special effect attached to the chest of SpinAOEPicked using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl
Set SpinEffects[0] = (Last created special effect)
Special Effect - Create a special effect at SpinPoint[0] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of SpinTarget using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl
Set SpinEffects[1] = (Last created special effect)
Custom script: call SetUnitX( udg_SpinNer, GetLocationX(udg_SpinPoint[1]) )
Custom script: call SetUnitY( udg_SpinNer, GetLocationY(udg_SpinPoint[1]) )
Custom script: call RemoveLocation(udg_SpinPoint[0])
Custom script: call RemoveLocation(udg_SpinPoint[1])
Custom script: call DestroyGroup(udg_SpinAOE)
Unit - Set life of SpinNer to ((Life of SpinNer) + 0.00)
Special Effect - Create a special effect attached to the head of SpinNer using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
Special Effect - Destroy (Last created special effect)
Wait 0.70 seconds
Special Effect - Destroy SpinEffects[0]
Special Effect - Destroy SpinEffects[1]
This second spell is basically an built in blink, cleave attack, lifesteal into a regular units attack.
I've done what i can to try and cover up the leaks, but i still need help - on top of that I have no idea how to make them Multi Unit Instanceable. T-T can someone help me please?