eloytoro
New Member
- Reaction score
- 4
My idea was to create an ability that creates illusions around the hero when you use it, but the hero is around the illusions created, so the enemy cant spot which is... but its not working, its supposed that lots of mirror image effects around the caster appear when the ability is triggered, instead only appears 1 and the trigger stops right there, so no illusions are created nor the hero appears
Code:
Duplicate
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Duplicate
Actions
Set DuplicateCaster = (Casting unit)
Set DuplicateCentralPoint = (Position of DuplicateCaster)
Unit - Hide DuplicateCaster
For each (Integer A) from 1 to 18, do (Actions)
Loop - Actions
Set DuplicateAngle = (DuplicateAngle + 20.00)
Unit - Create 1 Dummy for (Owner of DuplicateCaster) at (DuplicateCentralPoint offset by 300.00 towards (DuplicateAngle + 6.00) degrees) facing Default building facing degrees
Set DuplicateDummy[1] = (Last created unit)
Special Effect - Create a special effect at (Position of DuplicateDummy[1]) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
For each (Integer A) from 1 to (Level of Duplicate for DuplicateCaster), do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DuplicateAngle Equal to ((Real((Integer A))) x (360.00 / (((Real((Level of Duplicate for DuplicateCaster))) x 2.00) + 1.00)))
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DuplicateTrueFalse Equal to False
Then - Actions
Unit - Unhide DuplicateCaster
Unit - Move DuplicateCaster instantly to (Position of DuplicateDummy[1])
Set DuplicateTrueFalse = True
Else - Actions
Unit - Create 1 Dummy for (Owner of DuplicateCaster) at (Position of DuplicateCaster) facing Default building facing degrees
Set DuplicateDummy[2] = (Last created unit)
Hero - Create Wand of Illusion Dummy and give it to (Last created unit)
Hero - Order (Last created unit) to use (Last created item) on DuplicateCaster
Unit - Remove DuplicateDummy[2] from the game
Unit Group - Pick every unit in (Units within 350.00 of (Position of DuplicateCaster) matching (((Matching unit) is an illusion) Equal to True)) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Position of DuplicateDummy[1])
Else - Actions
Do nothing
Unit - Remove DuplicateDummy[1] from the game