• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Decoy v1.1 by iamdl

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
DescriptionAllow the blademaster to become invisible for 3 seconds, leaving an decoy of himself, after 3 seconds all nearby foe in the decoy will take damage by 100/150/200/250. When the Blademaster attacks a unit to break invisibility dealing 70 bonus damage.

Cooldown: 7/6/5/4


  • Decoy Cofiguration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- -------------------------- --------
      • -------- Decoy v1.1 --------
      • -------- by iamdl --------
      • -------- -------------------------- --------
      • -------- How to implement?? --------
      • -------- 1. Copy the Decoy Buff that can be found at Object Editor>Buffs/Effects --------
      • -------- 2. Copy the Decoy Ability that can be found at Object Editor>Abilities --------
      • -------- 3. Copy the Decoy Dummy that can be found at Object Editor>Units. --------
      • -------- 4. Copy the Decoy Folder that can be found at Trigger Editor(F4) --------
      • -------- 5. ENJOY! --------
      • -------- NOTE : You must tick the Automatically create unknown variable while pasting trigger data. That can be found at File>Preference>General. --------
      • -------- -------------------------- --------
      • -------- CONFIGURATION --------
      • -------- -------------------------- --------
      • -------- -------------------------- --------
      • -------- Setting up the ability we use --------
      • -------- While their you can set the duration of Invisibility. --------
      • -------- NOTE: the duration of invisibility must be equal to Decoy_Duration. --------
      • -------- -------------------------- --------
      • Set Decoy_Ability = Decoy
      • -------- -------------------------- --------
      • -------- Setting up the Dummy we using on our spell --------
      • -------- -------------------------- --------
      • Set Decoy_Dummy = Decoy Dummy
      • -------- -------------------------- --------
      • -------- Setting up the animation of Decoy_Dummy. --------
      • -------- NOTE: only compatible with BLADEMASTER and GROM HELLSCREAM --------
      • -------- -------------------------- --------
      • Set Decoy_Animation = spin
      • -------- -------------------------- --------
      • -------- Setting up the AoE of the spell --------
      • -------- -------------------------- --------
      • Set Decoy_AoE = 250.00
      • -------- -------------------------- --------
      • -------- Setting up the Damage of the spell --------
      • -------- -------------------------- --------
      • -------- -------------------------- --------
      • -------- Level 1 = 150 damage --------
      • -------- -------------------------- --------
      • Set Decoy_Damage[1] = 100.00
      • -------- -------------------------- --------
      • -------- Level 2 = 150 damage --------
      • -------- -------------------------- --------
      • Set Decoy_Damage[2] = 150.00
      • -------- -------------------------- --------
      • -------- Level 3 = 200 damage --------
      • -------- -------------------------- --------
      • Set Decoy_Damage[3] = 200.00
      • -------- -------------------------- --------
      • -------- Level 4 = 250 damage --------
      • -------- -------------------------- --------
      • Set Decoy_Damage[4] = 250.00
      • -------- -------------------------- --------
      • -------- Importang part do not change this --------
      • -------- -------------------------- --------
      • Set Decoy_DummySpin = 0.30
      • -------- -------------------------- --------
      • -------- Importang part do not change this --------
      • -------- -------------------------- --------
      • -------- -------------------------- --------
      • -------- Setting up the duration of the dummy --------
      • -------- NOTE: the duration of invisibility must be equal to Decoy_Duration. --------
      • -------- -------------------------- --------
      • Set Decoy_Duration = 3.00
      • -------- -------------------------- --------
      • -------- Special effect we use when the dummy is die. --------
      • -------- -------------------------- --------
      • Set Decoy_DeathSFX = Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
      • -------- -------------------------- --------
      • -------- Special effect we use when spell deals damage. --------
      • -------- -------------------------- --------
      • Set Decoy_HitSFX = Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
      • -------- -------------------------- --------
      • -------- END OF CONFIGURATION --------
      • -------- -------------------------- --------
      • -------- -------------------------- --------
      • -------- Importang part do not change this --------
      • -------- -------------------------- --------
      • Set Decoy_DummySpin = 0.30
      • Trigger - Add to Decoy Loop <gen> the event (Time - Every 0.03 seconds of game time)
      • -------- -------------------------- --------
      • -------- Importang part do not change this --------
      • -------- -------------------------- --------
  • Decoy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Decoy_Ability
    • Actions
      • Set DecoyIndexA = (DecoyIndexA + 1)
      • Set DecoyCaster[DecoyIndexA] = (Triggering unit)
      • Set DecoyIncrement = (Level of Decoy_Ability for DecoyCaster[DecoyIndexA])
      • Set DecoyDummyDuration[DecoyIndexA] = Decoy_Duration
      • Set DecoyAoE[DecoyIndexA] = Decoy_AoE
      • Set DecoyDummySpinTime[DecoyIndexA] = Decoy_DummySpin
      • Set DecoyDamage[DecoyIndexA] = Decoy_Damage[DecoyIncrement]
      • Set DecoyCasterLoc = (Position of DecoyCaster[DecoyIndexA])
      • Unit - Create 1 Decoy Dummy for (Owner of DecoyCaster[DecoyIndexA]) at DecoyCasterLoc facing (Facing of DecoyCaster[DecoyIndexA]) degrees
      • Set DecoyDummy[DecoyIndexA] = (Last created unit)
      • Unit - Pause DecoyDummy[DecoyIndexA]
      • Unit - Set life of DecoyDummy[DecoyIndexA] to (Percentage life of DecoyCaster[DecoyIndexA])%
      • Custom script: call RemoveLocation(udg_DecoyCasterLoc)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DecoyIndexA Equal to 1
        • Then - Actions
          • Trigger - Turn on Decoy Loop <gen>
        • Else - Actions
  • Decoy Loop
    • Events
    • Conditions
    • Actions
      • For each (Integer DecoyIndexB) from 1 to DecoyIndexA, do (Actions)
        • Loop - Actions
          • Set DecoyDummyDuration[DecoyIndexB] = (DecoyDummyDuration[DecoyIndexB] - 0.03)
          • Set DecoyDummyLoc = (Position of DecoyDummy[DecoyIndexB])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DecoyDummyDuration[DecoyIndexB] Less than or equal to DecoyDummySpinTime[DecoyIndexB]
            • Then - Actions
              • Animation - Play DecoyDummy[DecoyIndexB]'s Decoy_Animation animation
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DecoyDummyDuration[DecoyIndexB] Less than or equal to 0.00
                • Then - Actions
                  • Set DecoyGroup = (Units within DecoyAoE[DecoyIndexB] of DecoyDummyLoc)
                  • Special Effect - Create a special effect at DecoyDummyLoc using Decoy_DeathSFX
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Remove DecoyDummy[DecoyIndexB] from the game
                  • Unit Group - Pick every unit in DecoyGroup and do (Actions)
                    • Loop - Actions
                      • Set DecoyTarget[DecoyIndexB] = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (DecoyTarget[DecoyIndexB] is A structure) Equal to False
                          • (DecoyTarget[DecoyIndexB] is alive) Equal to True
                          • (DecoyTarget[DecoyIndexB] belongs to an enemy of (Owner of DecoyCaster[DecoyIndexB])) Equal to True
                        • Then - Actions
                          • Unit - Cause DecoyCaster[DecoyIndexB] to damage DecoyTarget[DecoyIndexB], dealing DecoyDamage[DecoyIndexB] damage of attack type Spells and damage type Normal
                          • Special Effect - Create a special effect attached to the origin of DecoyTarget[DecoyIndexB] using Decoy_HitSFX
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                  • Set DecoyCaster[DecoyIndexB] = DecoyCaster[DecoyIndexA]
                  • Set DecoyDummy[DecoyIndexB] = DecoyDummy[DecoyIndexA]
                  • Set DecoyDummyDuration[DecoyIndexB] = DecoyDummyDuration[DecoyIndexA]
                  • Set DecoyAoE[DecoyIndexB] = DecoyAoE[DecoyIndexA]
                  • Set DecoyDummySpinTime[DecoyIndexB] = DecoyDummySpinTime[DecoyIndexA]
                  • Set DecoyDamage[DecoyIndexB] = DecoyDamage[DecoyIndexA]
                  • Set DecoyTarget[DecoyIndexB] = DecoyTarget[DecoyIndexA]
                  • Set DecoyIndexB = (DecoyIndexB - 1)
                  • Set DecoyIndexA = (DecoyIndexA - 1)
                  • Custom script: call RemoveLocation(udg_DecoyDummyLoc)
                  • Custom script: call DestroyGroup(udg_DecoyGroup)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DecoyIndexA Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
            • Else - Actions
CHANGELOG said:
v1.0 Initial release
v1.1 Configuration added and delete useless variable


Keywords:
Decoy
Contents

Decoy v1.0 (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. IcemanBo: http://www.hiveworkshop.com/forums/spells-569/decoy-v1-1-iamdl-256319/#post2638143 12:13, 5th Jan 2015 IcemanBo...
The spell itself is simple but really cool, I like it :).

But I give you some of my suggestion, hope it useful for you ^^.

First: Create a configurables trigger or maybe explain your spell config :).

You need to find another way to avoid the damage twice on enemy units instead of using DecoyAddGroup because it can not be synchronized with the other caster, just imagine, if the caster A and B casting ability at the same time and when the time is up, caster A will cause damage to the enemy, but B is not, because that unit were added in DecoyAddGroup variable!.

  • Set DecoyCaster[DecoyIndex2] = DecoyCaster[DecoyIndex]
    • Set DecoyCasterLoc[DecoyIndex2] = DecoyCasterLoc[DecoyIndex]
    • Set DecoyDummy[DecoyIndex2] = DecoyDummy[DecoyIndex]
    • Set DecoyDummyLoc[DecoyIndex2] = DecoyDummyLoc[DecoyIndex]
    • Set DecoyDummyDuration[DecoyIndex2] = DecoyDummyDuration[DecoyIndex]
    • Set DecoyGroup[DecoyIndex2] = DecoyGroup[DecoyIndex]
    • Set DecoyAoE[DecoyIndex2] = DecoyAoE[DecoyIndex]
    • Set DecoyDummySpinTime[DecoyIndex2] = DecoyDummySpinTime[DecoyIndex]
    • Set DecoyDummyFadeout[DecoyIndex2] = DecoyDummyFadeout[DecoyIndex]
    • Set DecoyDamage[DecoyIndex2] = DecoyDamage[DecoyIndex]
    • Set DecoyIndex2 = (DecoyIndex2 - 1)
    • Set DecoyIndex = (DecoyIndex - 1)
This can save your life :):

onCast..
  • Decoy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wind Walk
    • Actions
      • -------- -----Instance a new Index----- --------
      • Set DecoyMUI = (DecoyMUI + 1)
      • -------- ..Save it.. --------
      • Set Decoy_MUI[DecoyMUI] = DecoyMUI
onLoop..

  • Decoy Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer DecoyMUI) from 1 to DecoyIndex, do (Actions)
        • Loop - Actions
          • -------- ..Load instance.. --------
          • Set DecoyData = Decoy_MUI[DecoyMUI]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • -------- ..Simply recycle it!.. --------
              • Set Decoy_MUI[DecoyData] = Decoy_MUI[DecoyMUI]
              • -------- For safer :) --------
              • Set Decoy_MUI[DecoyMUI] = -1
              • -------- Simply deindex --------
              • Set DecoyMUI = (DecoyMUI - 1)
              • -------- ----------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DecoyData Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
save Owner of DecoyCaster[DecoyIndex] to variable since it's used in period trigger.

Save damage type and attack type as configurable parts.

And as AKA.GywGod133 said :).

Suggestion: So, the fake blade master will stand still and spin?, that would be boring and easily to realize it's fake. You have to think a cool stuff to go with it like A blade master "can" attack the enemy or something like that?.

Well, just it!. That's just my personal review. Fix or not depending on you :), but keep it in mind: do NOT trying to fix my words like some "rude" people in here :).
 
  • Add a configuration trigger for the user, and make the levels to be configurable. Make as much configurable as possible.
  • Create a seperate spell in object editor, and rename it. Currently it's still "Windwalk".
  • Your damaging operations are linked with deindex part, and not with the spinning animation/time. That doesn't make sense.
  • Your FadeOut doesn't make sense. Just let it end if timer < 0.
  • There is no need to make your point variable an array.
  • There is no need to make DecoyGroup variable an array.
  • DecoyAddGroup is not needed.
  • You only remove the location if you deindex. Else you it leaks.

Just a suggestion: I would rename "DecoyIndex" into "DecoyMaxIndex" and "DecoyIndex2" into "DecoyIndex" or something like "DecoyInt/Integer". It will be simpler to read. :)

These should be enough changes for next update. Contact me for questions.
 
Changelog said:
v1.0 Initial release
v1.1 Configuration added and delete useless variable
^If I look at code, I can see you made more changes. It's not funny to read whole code again after each update.

So please make/keep a clean and good changelog, if you make further updates.

Now to spell:

- Attack- Damage type should be cinfigurable.
- Deindex if dummy is dead.
- No need to play the spin animation and making damage in case the dummy is dead. Makes no sense.
- It would only make sense to make damage while spinning. Not on deindex.
- The loop leaks.

Needs Fix
 
Top