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

Dark Phase v1.1 [MUI]

Dark Phase - Requires

*NOTE* changed hotkey to "D"
----------------------------------------------------------------------------------------------------
Map Loading Screen Details
Thanks to 0emjlr3 for the map template, however used own systems.

Press ESC to Restore your Mana, Hp and ability cooldowns.
Creeps respawn every 5 seconds.

Hope you enjoy me spell, Dont forget to leave feedback and comments.
----------------------------------------------------------------------------------------------------
TRIGGERS

  • Dark Phase
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dark Phase
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DP_Index1 Equal to 0
        • Then - Actions
          • Trigger - Turn on Dark Phase Loop <gen>
        • Else - Actions
      • Set DP_Index1 = (DP_Index1 + 1)
      • Set DP_Index2 = (DP_Index2 + 1)
      • Set DP_Caster[DP_Index2] = (Triggering unit)
      • Set DP_TargetPoint[DP_Index2] = (Target point of ability being cast)
      • Set DP_Duration[DP_Index2] = (1.50 + (0.50 x (Real((Level of Dark Phase for DP_Caster[DP_Index2])))))
      • Set DP_Expired[DP_Index2] = 0.00
      • Set DP_Boolean[DP_Index2] = True
      • Set DP_Damage[DP_Index2] = (50.00 + ((Real((Level of Dark Phase for DP_Caster[DP_Index2]))) x 25.00))
      • Set DP_Player[DP_Index2] = (Owner of DP_Caster[DP_Index2])
      • -------- ----------- --------
      • -------- Create Dummy Unit --------
      • -------- ----------- --------
      • Unit - Create 1 DP_Dummy for DP_Player[DP_Index2] at DP_TargetPoint[DP_Index2] facing Default building facing degrees
      • Set DP_Dummy[DP_Index2] = (Last created unit)
      • -------- ----------- --------
      • -------- Add Ability --------
      • Unit - Add dummy stun to DP_Dummy[DP_Index2]
      • Unit - Set level of dummy stun for DP_Dummy[DP_Index2] to (Level of Dark Phase for DP_Caster[DP_Index2])
      • Unit - Order DP_Dummy[DP_Index2] to Orc Tauren Chieftain - War Stomp
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 500.00 of DP_TargetPoint[DP_Index2] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) belongs to an ally of DP_Player[DP_Index2]) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) a and do (Actions)
        • Loop - Actions
          • Unit - Cause DP_Caster[DP_Index2] to damage (Picked unit), dealing DP_Damage[DP_Index2] damage of attack type Spells and damage type Normal
      • -------- ----------- --------
      • For each (Integer DP_loop) from 1 to 16, do (Actions)
        • Loop - Actions
          • Set DP_TempPoint = (DP_TargetPoint[DP_Index2] offset by 100.00 towards ((Real(DP_loop)) x 22.50) degrees)
          • Unit - Create 1 DP_Dummy2 for DP_Player[DP_Index2] at DP_TempPoint facing DP_TargetPoint[DP_Index2]
          • Set DP_Dummy2[DP_Index2] = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to DP_Dummy2[DP_Index2]
          • Unit Group - Add DP_Dummy2[DP_Index2] to DP_Group[DP_Index2]
          • Custom script: call RemoveLocation(udg_DP_TempPoint)
      • -------- ----------- --------

  • Dark Phase Loop
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • For each (Integer DP_IndexLoop) from 1 to DP_Index2, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • DP_Boolean[DP_IndexLoop] Equal to True
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (DP_Caster[DP_Index2] is alive) Equal to True
                • (DP_Caster[DP_IndexLoop] has buff Sleep (Pause)) Equal to False
                • (DP_Caster[DP_IndexLoop] has buff Stunned (Pause)) Equal to False
                • (DP_Duration[DP_IndexLoop] Greater than or equal to DP_Expired[DP_IndexLoop]
              • Then - Actions
                • Set DP_Expired[DP_IndexLoop] = (DP_Expired[DP_IndexLoop] + 0.03)
              • Else - Actions
                • Set DP_Index1 = (DP_Index1 - 1)
                • Set DP_Boolean[DP_IndexLoop] = False
                • Custom script: call DestroyGroup(udg_DP_Group[udg_DP_IndexLoop])
                • Custom script: call RemoveLocation(udg_DP_TargetPoint[udg_DP_IndexLoop])
                • Unit Group - Pick every unit in DP_Group[DP_IndexLoop] and do (Actions)
                  • Loop - Actions
                    • Unit - Remove (Picked unit) from the game
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • DP_Index1 Equal to 0
                    • Then - Actions
                    • Set DP_Index2 = 0
                    • Trigger - Turn off (This trigger)
                  • Else - Actions
        • Else - Actions
How to import :

1) Copy over Abilities : "Dark Phase" and "dummy stun"
2) Copy Over dummies : "DP_Dummy" and "DP_Dummy2"
3) Copy Over triggers : "Dark Phase" and "Dark Phase loop"
4) Add ability to your hero
5) Test spell

Dont forget if you download post a reply with feedback and comments.

Updates:
Made damage be caused by hero, not dummy unit.
Changed Hotkey
Fixed a small leak
Fixed another leak,
Removed the running of the trigger, when it was already turned on.
Moved position of turning off the trigger.
Changed from Owner of "...." to Player.
Fixed sight range on dummies,
Add Import instructions into map
Moved some triggers around,
Redone the looping trigger,
Improved importing instructions.


Keywords:
evil, dark, phase, spell, abilities, dummy. hero, damage, stun, mana, duration
Contents

Dark Phase (Map)

Reviews
Could be useful. No leaks and it is MUI.

Moderator

M

Moderator

Maker, 3rd Aug 2011, Dark Phase v1.1

Could be useful. No leaks and it is MUI.
 
Owner of DP_Caster[DP_Index2] -> Triggering Player


This is unneeded for the casting.
  • Events
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • DP_Index1 Equal to 0
      • Then - Actions
        • Trigger - Turn off Dark Phase Loop <gen>
You could make this more efficient by substituting (Last created unit) with a variable and using the variable.

Also, this spell is pretty much an effect spam/eyecandy in its current state, as its just a 'pretty' warstomp. It looks like the dummy unit's Warstomp inflicts the damage, instead of the hero, which is bad for various systems. I suggest making the hero inflict the damage instead of warstomp via
  • Unit - Cause (unit) to damage (unit), dealing XXX damage of attack type Spells and damage type TYPE
The tooltip is bad, conflicts with Patrol.

I have changed the tooltip, and changed how damage is caused.
And Haxel explains why not to use Triggering Player; The first trigger has been changed, i forgot the change from
  • Trigger - Turn Off
to
  • Trigger - Turn On

No. Triggering player does not work with this event.

Anything else about the spell?
 
Kk. I just tested it and it worked fine, and every other spell uses it. Mostly because the Owner of DP_Caster[DP_Index] is the Triggering player.

  • Set DP_Caster[DP_Index2] = (Triggering unit)
  • Unit - Create 1 DP_Dummy for (Owner of DP_Caster[DP_Index2]) at DP_TargetPoint[DP_Index2] facing Default building facing degrees

Hmmm Agreeeded, every other spell does use it, Guess i just never used it :')
Will just change that.

How couldn't it :p

I dont know? :'D

Off topic : your still copying my signature ;)
 
Not really :p
I made mine a long time ago :p
I thought you copied mine because you have the same order, and a useless "My Resources #2" column :p
Also, "My maps" seems just as redundant ;)

Shhhh ;)
My second column is there for when i need it,
and well the "Maps" one is just there for show :p
Anyways back on-topic!

Changed to Kinda triggering player;
Used a variable
  • Set DP_Player[DP_Index2] = (Owner of (DP_Caster[DP_Index2]))
 
Level 9
Joined
Oct 17, 2009
Messages
370
From what i know (I've learnt myself) Triggering Player only works with Player events, not Unit events like this, for example
  • Player - Player 1 (Red) skips a cinematic sequence
  • Player - Player 2 (Blue) skips a cinematic sequence
Then triggering player will refer to... the triggering player.

If it works for unit events too then I've learnt something new.

I like the spell, cool effects and leakless/MUI
 
From what i know (I've learnt myself) Triggering Player only works with Player events, not Unit events like this, for example
  • Player - Player 1 (Red) skips a cinematic sequence
  • Player - Player 2 (Blue) skips a cinematic sequence
Then triggering player will refer to... the triggering player.

If it works for unit events too then I've learnt something new.

I like the spell, cool effects and leakless/MUI

Yes you learn something new every day,
and thankyou for the feedback.
 
Your loop trigger looks like too much work for something so simple. You
can achieve the same thing using a timed life with each unit.

The "DP_Dummy2" Uses a timed life, but the first dummy does not,
The loop trigger is just to remove any units that did not get the timed life "Just incase" and then destroy the unit group and first dummy.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
What about the indexing requires JNGP? Nothing looks special about it.

If you make it in GUI and you want the most people to use it, it should
be openable in World Editor.

vJass stuff should be the only things that requires JNGP.

I recommend World Editor over JGNP if you build GUI, because World
Editor has access to hashtables (very important).
 
What about the indexing requires JNGP? Nothing looks special about it.

If you make it in GUI and you want the most people to use it, it should
be openable in World Editor.

vJass stuff should be the only things that requires JNGP.

I recommend World Editor over JGNP if you build GUI, because World
Editor has access to hashtables (very important).

Okay,
Yea i figured that when i was trying to write things in GUI using hashtables, was really work out that well.
Anyways done some small updates.
 
Top