• 🏆 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!

Obscuration v1.1 [GUI]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Spell Name: Obscuration (my entry for ZephyrContest#9)
Description:

The hero will be invisible but can't attack and use other spells. In this state, he has a sub ability to teleport an enemy ground unit to the caster's position.
The target is invulnerable and can't move when teleported state and stuns nearby enemy units for 5 seconds. After teleporting, 6 firebolts will hit the target, dealing damage and stun.

|cffffcc00Teleport timer:|r 14 seconds or you can use the Obscuration ability to teleport prematurely and disables the Teleport ability.

|cffffcc00Level 1|r - Invisibility lasts 10 seconds, fire damage deals 5 each.
|cffffcc00Level 2|r - Invisibility lasts 15 seconds, fire damage deals 10 each.
|cffffcc00Level 3|r - Invisibility lasts 20 seconds, fire damage deals 15 each.
|cffffcc00Level 4|r - Invisibility lasts 25 seconds, fire damage deals 20 each.
|cffffcc00Level 5|r - Invisibility lasts 30 seconds, fire damage deals 25 each.

Instructions:
- Be sure to check the Automatically create unknown variables while passing trigger data, via File>Preferences>General tab.
- In the object editor, copy all the custom Unit and Abilities to your map.
- Copy all that is written from the Obscuration folder to your map.
- Be sure to input the right configutation from the Setup trigger

Triggers:

  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- The invisibility cast --------
      • Set OB_CastInvisibility = Obscuration
      • -------- The teleport cast to target --------
      • Set OB_CastTeleport = Teleport
      • -------- The invisibility ability, NEVER TOUCH THIS coz this is not a custom abiity --------
      • Set OB_InvisibilityAbil = Ghost
      • -------- The invisibility base duration multiplier --------
      • Set OB_InvisibilityBaseDuration = 5.00
      • -------- The effect of the teleport --------
      • Set OB_SfxTeleport = Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
      • -------- The dummy SFX of the teleport, this is a unit --------
      • Set OB_TeleporterType = MDX [Teleporter]
      • -------- This will stun ONLY the enemies in the StunUnitsAoE --------
      • Set OBT_StunAbil = Stun
      • -------- This will stun and damage the target after being teleported --------
      • Set OBT_StunAndDamAbil = Stun and Damage
      • -------- Disables the attack of the caster once he is invisible --------
      • Set OB_DisableAttackAbil = Cargo Hold (Orc Burrow)
      • -------- The dummy caster, in the object editor, the CAST BACKSWING and CAST POINT MUST be 0 --------
      • -------- Only 1 dummy is created per cast --------
      • Set OBT_DummyCasterType = DUMMY_CASTER
      • -------- The stunning AOE of all enemies around the target, this should be less than the CAST RANGE of the STUN ability --------
      • Set OBT_StunUnitsAoE = 500.00
      • -------- Preloadings, NEVER TOUCH THIS --------
      • Set OB_Loc1 = (Random point in (Playable map area))
      • Unit - Create 1 OB_TeleporterType for Neutral Passive at OB_Loc1 facing Default building facing degrees
      • Unit - Kill (Last created unit)
      • Unit - Create 1 OBT_DummyCasterType for Neutral Passive at OB_Loc1 facing Default building facing degrees
      • Unit - Add OBT_StunAbil to (Last created unit)
      • Unit - Add OBT_StunAndDamAbil to (Last created unit)
      • Unit - Add OB_CastTeleport to (Last created unit)
      • Unit - Add OB_DisableAttackAbil to (Last created unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_OB_Loc1)
      • Custom script: call Preload("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl")
  • Obscuration
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to OB_CastInvisibility
          • (Ability being cast) Equal to OB_CastTeleport
    • Actions
      • Set OB_Caster = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to OB_CastInvisibility
        • Then - Actions
          • Set OB_Level = (Level of OB_CastInvisibility for OB_Caster)
          • Custom script: call ExecuteFunc("OB_CastInvisibility")
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Equal to OB_CastTeleport
            • Then - Actions
              • Set OB_Level = (Level of OB_CastTeleport for OB_Caster)
              • Custom script: call ExecuteFunc("OB_Teleporting")
            • Else - Actions
      • Custom script: endfunction
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • Custom script: function OB_TeleportingLoop takes nothing returns nothing
      • For each (Integer OBT_IndexLOOP) from 1 to OBT_Index1, do (Actions)
        • Loop - Actions
          • Set OBT_Index2 = OBT_IndexARRAY[OBT_IndexLOOP]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (OBT_Caster[OBT_Index2] is alive) Equal to True
              • (OBT_Target[OBT_Index2] is alive) Equal to True
              • (Level of OB_InvisibilityAbil for OBT_Caster[OBT_Index2]) Greater than 0
            • Then - Actions
              • Set OBT_Waiting[OBT_Index2] = (OBT_Waiting[OBT_Index2] + 0.20)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • OBT_Waiting[OBT_Index2] Equal to 1.00
                • Then - Actions
                  • Animation - Play OBT_Portal[OBT_Index2]'s stand animation
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • OBT_Waiting[OBT_Index2] Equal to 4.00
                    • Then - Actions
                      • Set OB_Loc1 = (Position of OBT_Portal[OBT_Index2])
                      • Set OBT_GroupStun = (Units within OBT_StunUnitsAoE of OB_Loc1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of OBT_Portal[OBT_Index2])) Equal to True) and (True Equal to True))))
                      • Unit Group - Pick every unit in OBT_GroupStun and do (Actions)
                        • Loop - Actions
                          • Unit - Order OBT_Portal[OBT_Index2] to Neutral - Firebolt (Picked unit)
                      • Custom script: call RemoveLocation(udg_OB_Loc1)
                      • Custom script: call DestroyGroup(udg_OBT_GroupStun)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • OBT_Waiting[OBT_Index2] Equal to 13.00
                        • Then - Actions
                          • Set OB_Loc1 = (Position of OBT_Portal[OBT_Index2])
                          • Special Effect - Create a special effect at OB_Loc1 using OB_SfxTeleport
                          • Special Effect - Destroy (Last created special effect)
                          • Custom script: call RemoveLocation(udg_OB_Loc1)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • OBT_Waiting[OBT_Index2] Equal to 14.00
                            • Then - Actions
                              • Unit - Add a 2.00 second Generic expiration timer to OBT_DamagerU[OBT_Index2]
                              • Unit - Make OBT_Target[OBT_Index2] Vulnerable
                              • Unit - Unpause OBT_Target[OBT_Index2]
                              • Unit - Kill OBT_Portal[OBT_Index2]
                              • Set OB_Loc1 = (Position of OBT_Caster[OBT_Index2])
                              • Special Effect - Create a special effect at OB_Loc1 using OB_SfxTeleport
                              • Special Effect - Destroy (Last created special effect)
                              • Unit - Move OBT_Target[OBT_Index2] instantly to OB_Loc1, facing Default building facing degrees
                              • Custom script: call RemoveLocation(udg_OB_Loc1)
                              • Set OB_Loc1 = (Position of OBT_Target[OBT_Index2])
                              • Set OBT_Angle = 0.00
                              • For each (Integer A) from 1 to 6, do (Actions)
                                • Loop - Actions
                                  • Set OB_Loc2 = (OB_Loc1 offset by 500.00 towards OBT_Angle degrees)
                                  • Unit - Move OBT_DamagerU[OBT_Index2] instantly to OB_Loc2, facing Default building facing degrees
                                  • Unit - Order OBT_DamagerU[OBT_Index2] to Neutral - Firebolt OBT_Target[OBT_Index2]
                                  • Set OBT_Angle = (OBT_Angle + 60.00)
                                  • Custom script: call RemoveLocation(udg_OB_Loc2)
                              • Custom script: call RemoveLocation(udg_OB_Loc1)
                            • Else - Actions
            • Else - Actions
              • Set OBT_Check[OBT_Index2] = True
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • OBT_Waiting[OBT_Index2] Equal to 14.40
                  • OBT_Check[OBT_Index2] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • OBT_Check[OBT_Index2] Equal to True
                • Then - Actions
                  • Unit - Add a 2.00 second Generic expiration timer to OBT_DamagerU[OBT_Index2]
                  • Unit - Make OBT_Target[OBT_Index2] Vulnerable
                  • Unit - Unpause OBT_Target[OBT_Index2]
                  • Set OB_Loc1 = (Position of OBT_Portal[OBT_Index2])
                  • Special Effect - Create a special effect at OB_Loc1 using OB_SfxTeleport
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_OB_Loc1)
                  • Unit - Kill OBT_Portal[OBT_Index2]
                  • Set OB_Loc1 = (Position of OBT_Caster[OBT_Index2])
                  • Special Effect - Create a special effect at OB_Loc1 using OB_SfxTeleport
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Move OBT_Target[OBT_Index2] instantly to OB_Loc1, facing Default building facing degrees
                  • Custom script: call RemoveLocation(udg_OB_Loc1)
                  • Set OB_Loc1 = (Position of OBT_Target[OBT_Index2])
                  • Set OBT_Angle = 0.00
                  • For each (Integer A) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Set OB_Loc2 = (OB_Loc1 offset by 500.00 towards OBT_Angle degrees)
                      • Unit - Move OBT_DamagerU[OBT_Index2] instantly to OB_Loc2, facing Default building facing degrees
                      • Unit - Order OBT_DamagerU[OBT_Index2] to Neutral - Firebolt OBT_Target[OBT_Index2]
                      • Set OBT_Angle = (OBT_Angle + 60.00)
                      • Custom script: call RemoveLocation(udg_OB_Loc2)
                  • Custom script: call RemoveLocation(udg_OB_Loc1)
                • Else - Actions
              • -------- Recycle --------
              • Set OBT_IndexARRAY[OBT_IndexLOOP] = OBT_IndexARRAY[OBT_Index1]
              • Set OBT_IndexARRAY[OBT_Index1] = OBT_Index2
              • Set OBT_IndexLOOP = (OBT_IndexLOOP - 1)
              • Set OBT_Index1 = (OBT_Index1 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • OBT_Index1 Equal to 0
                • Then - Actions
                  • Custom script: call PauseTimer(udg_OBT_Timer)
                • Else - Actions
            • Else - Actions
      • Custom script: endfunction
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • Custom script: function OB_Teleporting takes nothing returns nothing
      • Set OB_Caster = (Triggering unit)
      • Set OB_Loc1 = (Position of (Target unit of ability being cast))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OBT_Index1 Equal to 0
        • Then - Actions
          • Custom script: call TimerStart(udg_OBT_Timer, 0.2, true, function OB_TeleportingLoop)
        • Else - Actions
      • Set OBT_Index1 = (OBT_Index1 + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OBT_Index1 Greater than OBT_IndexMAX
        • Then - Actions
          • Set OBT_IndexARRAY[OBT_Index1] = OBT_Index1
          • Set OBT_IndexMAX = OBT_Index1
        • Else - Actions
      • Set OBT_Index2 = OBT_IndexARRAY[OBT_Index1]
      • -------- setting all --------
      • Set OBT_Caster[OBT_Index2] = (Triggering unit)
      • Set OBT_Target[OBT_Index2] = (Target unit of ability being cast)
      • Unit - Pause OBT_Target[OBT_Index2]
      • Unit - Make OBT_Target[OBT_Index2] Invulnerable
      • Set OBT_Waiting[OBT_Index2] = 0.00
      • Set OBT_Check[OBT_Index2] = False
      • -------- adding the teleporter --------
      • Unit - Create 1 OB_TeleporterType for (Triggering player) at OB_Loc1 facing Default building facing degrees
      • Set OBT_Portal[OBT_Index2] = (Last created unit)
      • Custom script: call UnitRemoveAbility(bj_lastCreatedUnit,'Amov')
      • Animation - Play (Last created unit)'s birth animation
      • Custom script: call UnitAddAbility(udg_OBT_Portal[udg_OBT_Index2], udg_OBT_StunAbil)
      • -------- adding the damager --------
      • Unit - Create 1 OBT_DummyCasterType for (Triggering player) at OB_Loc1 facing Default building facing degrees
      • Set OBT_DamagerU[OBT_Index2] = (Last created unit)
      • Unit - Set level of OBT_StunAndDamAbil for OBT_DamagerU[OBT_Index2] to OB_Level
      • Custom script: call UnitRemoveAbility(bj_lastCreatedUnit,'Amov')
      • Custom script: call RemoveLocation(udg_OB_Loc1)
      • Custom script: endfunction
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • Custom script: function OB_Looper takes nothing returns nothing
      • For each (Integer OB_InstanceLOOP) from 1 to OB_Instance1, do (Actions)
        • Loop - Actions
          • Set OB_Instance2 = OB_InstanceARRAY[OB_InstanceLOOP]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (OB_CasterAR[OB_Instance2] is alive) Equal to True
              • OB_Dur[OB_Instance2] Greater than or equal to 0.00
              • (Level of OB_InvisibilityAbil for OB_CasterAR[OB_Instance2]) Greater than 0
            • Then - Actions
              • Set OB_Dur[OB_Instance2] = (OB_Dur[OB_Instance2] - 0.10)
            • Else - Actions
              • Unit - Remove OB_InvisibilityAbil from OB_CasterAR[OB_Instance2]
              • Unit - Remove OB_DisableAttackAbil from OB_CasterAR[OB_Instance2]
              • Unit - Remove OB_CastTeleport from OB_CasterAR[OB_Instance2]
              • Unit Group - Remove OB_CasterAR[OB_Instance2] from OBT_GroupInvisible
              • -------- Recycle --------
              • Set OB_InstanceARRAY[OB_InstanceLOOP] = OB_InstanceARRAY[OB_Instance1]
              • Set OB_InstanceARRAY[OB_Instance1] = OB_Instance2
              • Set OB_InstanceLOOP = (OB_InstanceLOOP - 1)
              • Set OB_Instance1 = (OB_Instance1 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • OB_Instance1 Equal to 0
                • Then - Actions
                  • Custom script: call PauseTimer(udg_OB_Timer)
                • Else - Actions
      • Custom script: endfunction
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • Custom script: function OB_CastInvisibility takes nothing returns nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (OB_Caster is in OBT_GroupInvisible) Equal to False
        • Then - Actions
          • Unit - Add OB_InvisibilityAbil to OB_Caster
          • Unit - Add OB_DisableAttackAbil to OB_Caster
          • Unit - Add OB_CastTeleport to OB_Caster
          • Unit - Set level of OB_CastTeleport for OB_Caster to OB_Level
          • Unit Group - Add OB_Caster to OBT_GroupInvisible
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OB_Instance1 Equal to 0
            • Then - Actions
              • Custom script: call TimerStart(udg_OB_Timer, 0.1, true, function OB_Looper)
            • Else - Actions
          • Set OB_Instance1 = (OB_Instance1 + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OB_Instance1 Greater than OB_InstanceMAX
            • Then - Actions
              • Set OB_InstanceARRAY[OB_Instance1] = OB_Instance1
              • Set OB_InstanceMAX = OB_Instance1
            • Else - Actions
          • Set OB_Instance2 = OB_InstanceARRAY[OB_Instance1]
          • -------- setting all --------
          • Set OB_CasterAR[OB_Instance2] = OB_Caster
          • -------- 10/15/20/25/30 --------
          • Set OB_Dur[OB_Instance2] = (((Real(OB_Level)) x OB_InvisibilityBaseDuration) + 5.00)
          • Set OB_CheckFunc[OB_Instance2] = True
        • Else - Actions
          • Unit - Remove OB_InvisibilityAbil from OB_Caster
          • Unit - Remove OB_DisableAttackAbil from OB_Caster
          • Unit - Remove OB_CastTeleport from OB_Caster
          • Unit Group - Remove OB_Caster from OBT_GroupInvisible
  • ObscutationCantUse
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Not equal to OB_CastInvisibility
          • (Ability being cast) Not equal to OB_CastTeleport
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in OBT_GroupInvisible) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop
        • Else - Actions



v1.1
- Added Sfx and Aoe configurations
- Added more information about the configurations



Keywords:
zephyr,hide,invisible,assasination,mckill2009,youtube,fire,spell,dota,starcraft
Contents

Obscuration (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 11:06, 27th Jul 2012 Magtheridon96: Contest Results: Concept (7.5/10) Creative (2.5/5) Unique (5/5) Okay, I have to be honest, it's quite unique, which is great...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

11:06, 27th Jul 2012
Magtheridon96:

Contest Results:

mckill2009


  • Concept (7.5/10)
    • Creative (2.5/5)
    • Unique (5/5)

    Okay, I have to be honest, it's quite unique, which is great, but it's pretty boring. Still, there are some creative effects put in there, so I can't give you a very low score. I only deducted points because of irrelevancy. If it was more relevant, it would get a 9 or a 10.​
  • Coding (17/20)
    • MUI & Leakless (8/8)
    • Bugless (4.5/5)
    • Efficient (4.5/5)
    • Documentation & Comments (0/2)


    • Dude, I really wish you could've done this in JASS. GUI hurts my eyes ._.
    • It's MUI, and there are no leaks. Okay, well done.
    • As for bugs, there are none that I could produce.
    • It would be a bit more efficient if you would cache the triggering player into an array variable instead of repeating it inside the loop (you aren't actually repeating it, but you're getting the owner of the portal unit :/
    • The number of projectiles and the effect should be configurable.
    • Currently, it's not very readable, and since the "Documentation & Comments" field is only there to take into account readability, I'll have to deduct points there.
    • You don't need to preload the effect currently because it's in the MPQ file, but if you make it configurable, then leave the preload line there since the effect may or may not be in the MPQ.
    • There is only one small error. Your enemies would have vision on you when you cast the sub-ability on an enemy unit for a fraction of a second. I don't know how to fix, so I'll only deduct 0.5 here.
  • Visuals (7/10)
    • Relevant-to-Theme Effects (1/4)
    • Quality of Tooltips (3/3)
    • Quantity of Effects (3/3)

    The effects were not really relevant to the theme of assassination (Fire-balls, beacons, etc..). The tooltips are well done. The spell is not too hogged with special effects.​

Total: 31.5/40
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
Also, I would suggest avoiding those 'x' spams because they aren't exactly very readable ;/
I did that coz I wanted to create a block for the functions :)...

It would be nice if you cache repeated function calls too though. (Like (Triggering player), (Target unit of ability being cast), etc...)
OK, I dont think I need to do this coz the triggering player has only 2 instances and Target has 1 instance..., maybe the last created unit, it has 3 instances...

BTW, this is the first and last time Ima make a spell in this format coz it's really complicated :p...

BIG EDIT:
I changed my mind coz I'm gonna transform this in vJass...
 
Last edited:
Top