Hey guys I figure out a way to make a complex spell but I want it to be MUI, or at least MPI. So can anyone help me optimize this trigger a little and make it MUI/MPI? Please, I really need this spell to work on my map.
Note: I used Paladon's GUI Knockback System in it and will give him, as well as those who helped my optimizing or making it MUI/MPI credit in my real map, this is just a spell test map.
Edit: Replaced the map with the latest version.
Edit 1: Added trigger.
Note: I used Paladon's GUI Knockback System in it and will give him, as well as those who helped my optimizing or making it MUI/MPI credit in my real map, this is just a spell test map.
-
HAV Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Hi-Accelerated Vision
-
-
Actions
-
Set HAV_Caster = (Triggering unit)
-
Set HAV_AttackTimesMax = (11 - (Level of Hi-Accelerated Vision for HAV_Caster))
-
Set HAV_Duration = (10 + ((Agility of HAV_Caster (Include bonuses)) / 10))
-
Set HAV_IllusionsBonusDmg = ((Real((Agility of HAV_Caster (Include bonuses)))) x 0.80)
-
Set HAV_KnockbackBonusDmg = ((Real((Agility of HAV_Caster (Include bonuses)))) x 1.20)
-
Unit - Set HAV_Caster movement speed to 522.00
-
Unit - Add Spellbook(HAV) to HAV_Caster
-
Player - Disable Spellbook(HAV) for (Owner of HAV_Caster)
-
Trigger - Turn on HAV AttackStack <gen>
-
Trigger - Turn on HAV Knockback Proc <gen>
-
Trigger - Turn on HAV SFX Change Animation <gen>
-
Trigger - Turn on HAV SFX Remove <gen>
-
Trigger - Turn on HAV SFX Loop <gen>
-
Trigger - Turn on HAV Time Index <gen>
-
Trigger - Turn off (This trigger)
-
-
-
HAV Time Index
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Set HAV_TimeIndex = (HAV_TimeIndex + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HAV_TimeIndex Equal to HAV_Duration
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Trigger - Turn off HAV AttackStack <gen>
-
Trigger - Turn off HAV Knockback Proc <gen>
-
Trigger - Turn off HAV SFX Change Animation <gen>
-
Trigger - Turn off HAV SFX Loop <gen>
-
Trigger - Turn off HAV SFX Remove <gen>
-
Unit - Set HAV_Caster movement speed to (Default movement speed of HAV_Caster)
-
Unit - Remove Hi-Accelerated Vison (Slow) from HAV_Caster
-
Player - Enable Spellbook(HAV) for (Owner of HAV_Caster)
-
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to HeroDummy (Scale 1))) and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to KnockDummy (Scale 1))) and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Set HAV_Caster = No unit
-
Set HAV_AttackTimesMax = 0
-
Set HAV_Duration = 0
-
Set HAV_AttackTimes = 0
-
Set HAV_TimeIndex = 0
-
Trigger - Turn on HAV Cast <gen>
-
-
Else - Actions
-
-
-
-
HAV SFX Loop
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
Unit - Create 1 HeroDummy (Scale 1) for (Owner of HAV_Caster) at (Position of HAV_Caster) facing (Facing of HAV_Caster) degrees
-
Set HAV_Dummy = (Last created unit)
-
Animation - Change HAV_Dummy's vertex coloring to (65.00%, 65.00%, 65.00%) with 70.00% transparency
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HAV_SFXAnim Not equal to smart
-
-
Then - Actions
-
Animation - Play HAV_Dummy's HAV_SFXAnim animation
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HAV_SFXAnim Equal to smart
-
-
Then - Actions
-
Animation - Play HAV_Dummy's walk animation
-
-
Else - Actions
-
-
-
-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Hi-Accelerated Vision (Slow)) Equal to True)) and do (Actions)
-
Loop - Actions
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Unit - Create 1 KnockDummy (Scale 1) for (Owner of KBA_TargetUnit) at (Position of KBA_TargetUnit) facing (Facing of KBA_TargetUnit) degrees
-
Animation - Change (Last created unit)'s vertex coloring to (85.00%, 85.00%, 85.00%) with 75.00% transparency
-
-
-
HAV SFX Remove
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to HeroDummy (Scale 1)
-
(Unit-type of (Triggering unit)) Equal to KnockDummy (Scale 1)
-
-
-
-
Actions
-
Unit - Remove (Triggering unit) from the game
-
-
-
HAV SFX Change Animation
-
Events
-
Unit - A unit Is issued an order targeting an object
-
Unit - A unit Is issued an order targeting a point
-
-
Conditions
-
(Triggering unit) Equal to HAV_Caster
-
-
Actions
-
Set HAV_SFXAnim = (String((Issued order)))
-
-
-
HAV AttackStack
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Attacking unit) Equal to HAV_Caster
-
-
Actions
-
Set HAV_AttackTimes = (HAV_AttackTimes + 1)
-
Unit - Cause HAV_Caster to damage (Attacked unit), dealing HAV_IllusionsBonusDmg damage of attack type Hero and damage type Normal
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Attacked unit) Equal to KBA_TargetUnit
-
-
Then - Actions
-
Unit - Cause HAV_Caster to damage (Attacked unit), dealing HAV_KnockbackBonusDmg damage of attack type Hero and damage type Normal
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HAV_AttackTimes Equal to HAV_AttackTimesMax
-
-
Then - Actions
-
Set HAV_AttackTimes = 0
-
Game - Display to (All players) the text: Proc
-
Unit - Create 1 Dummy (Scale 1) for (Owner of HAV_Caster) at (Position of HAV_Caster) facing Default building facing degrees
-
Unit - Add Sample Meele Knockback Spell to (Last created unit)
-
Unit - Set level of Sample Meele Knockback Spell for (Last created unit) to (Level of Hi-Accelerated Vision for HAV_Caster)
-
Unit - Order (Last created unit) to Neutral Naga Sea Witch - Forked Lightning (Attacked unit)
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
-
Else - Actions
-
-
-
-
HAV Knockback Proc
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Sample Meele Knockback Spell
-
-
Actions
-
-------- This are the applied actions of the 'Actions to apply' trigger. --------
-
Unit - Cause HAV_Caster to damage KBA_TargetUnit, dealing HAV_KnockbackInitialDmg damage of attack type Hero and damage type Normal
-
Set KBA_Caster = (Triggering unit)
-
Set KBA_TargetUnit = (Target unit of ability being cast)
-
Set KBA_StartingPosition = (Position of (Triggering unit))
-
Set KBA_Level = 1
-
Set KBA_Speed = 3.00
-
Set KBA_DistancePerLevel = 800.00
-
Set KBA_SpecialEffects[1] = Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
-
Set KBA_SpecialEffects[2] = Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
-
Set KBA_DestroyTrees = False
-
Trigger - Run Knockback Proc <gen> (checking conditions)
-
-------- --------
-
-
Edit: Replaced the map with the latest version.
Edit 1: Added trigger.
Attachments
Last edited: