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

Moonlight Shadow - Mirana Spell Trigger Problem.

Status
Not open for further replies.
Level 8
Joined
Aug 8, 2011
Messages
297
What can be wrong with this Trigger ? Monlight Shadow Mirana Spell from Dota. Sometimes the heroes dont Debuff the Invis spell that Mirana Spell grants for 7-12 seconds. "Heroes Running around constant invisible if they dont shoot on units, when they stop shooting, invisible will come back again"...

Here is the triggers:

  • Moonlight Shadow
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Moonlight Shadow
    • Actions
      • Set MoonlightShadow_Counts = (MoonlightShadow_Counts + 1)
      • Set MoonlightShadow_Caster[MoonlightShadow_Counts] = (Casting unit)
      • Set MoonlightShadow_Duration[1] = 7.00
      • Set MoonlightShadow_Duration[2] = 9.00
      • Set MoonlightShadow_Duration[3] = 11.00
      • Set MoonlightShadow_Point[3] = (Position of MoonlightShadow_Caster[MoonlightShadow_Counts])
      • Unit - Create 1 Dummy for (Owner of MoonlightShadow_Caster[MoonlightShadow_Counts]) at MoonlightShadow_Point[3] facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to MoonlightShadow_Counts
      • Unit - Add a MoonlightShadow_Duration[(Level of Moonlight Shadow for MoonlightShadow_Caster[MoonlightShadow_Counts])] second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to MoonlightShadow_TimeGroup
      • Set MoonlightShadow_UnitGroup = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of MoonlightShadow_Caster[MoonlightShadow_Counts])) Equal to True))))
      • Unit Group - Pick every unit in MoonlightShadow_UnitGroup and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit Group - Add (Picked unit) to MoonlightShadow_InvisibleGroup
          • Set MoonlightShadow_Point[1] = (Position of (Picked unit))
          • Unit - Create 1 Dummy for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
          • Unit - Add Moonlight Shadow Dummy to (Last created unit)
          • Unit - Set level of Moonlight Shadow Dummy for (Last created unit) to (Level of Moonlight Shadow for MoonlightShadow_Caster[MoonlightShadow_Counts])
          • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Picked unit)
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation (udg_MoonlightShadow_Point[1])
      • Custom script: call DestroyGroup (udg_MoonlightShadow_UnitGroup)
      • Custom script: call RemoveLocation (udg_MoonlightShadow_Point[3])
      • Trigger - Turn on Moonlight Shadow Effects <gen>
  • Moonlight Shadow Effects
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in MoonlightShadow_InvisibleGroup and do (Actions)
        • Loop - Actions
          • Set MoonlightShadow_PickedUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Moonlight Shadow ) Not equal to True
            • Then - Actions
              • Set MoonlightShadow_Point[2] = (Position of MoonlightShadow_PickedUnit)
              • Unit - Create 1 Dummy for (Owner of MoonlightShadow_Caster[MoonlightShadow_CustomValue]) at MoonlightShadow_Point[2] facing Default building facing degrees
              • Unit - Add Moonlight Shadow Dummy to (Last created unit)
              • Unit - Set level of Moonlight Shadow Dummy for (Last created unit) to (Level of Moonlight Shadow for MoonlightShadow_Caster[MoonlightShadow_CustomValue])
              • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Picked unit)
              • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
              • Custom script: call RemoveLocation (udg_MoonlightShadow_Point[2])
            • Else - Actions
          • Unit Group - Pick every unit in MoonlightShadow_TimeGroup and do (Actions)
            • Loop - Actions
              • Set MoonlightShadow_CustomValue = (Custom value of (Picked unit))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is dead) Equal to True
                • Then - Actions
                  • Unit - Remove Moonlight Shadow buff from MoonlightShadow_PickedUnit
                  • Unit Group - Remove MoonlightShadow_PickedUnit from MoonlightShadow_InvisibleGroup
                  • Unit Group - Remove (Picked unit) from MoonlightShadow_TimeGroup
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in MoonlightShadow_InvisibleGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Level 9
Joined
Aug 7, 2009
Messages
380
Just add allies of the caster into 1 group, then add them the Permanent Invisibilty.
After the set amount of time, pick that group and remove the ability
It's that simple

Another thing:
Why you share your map so... PUBLIC like this... your project could be stolen easily, also can add cheats, lame stuffs... and downgrade your map quality... blah blah stuffs
so... don't share your unprotected map unless very necessary

Goodluck with the spell
 
Level 9
Joined
Aug 7, 2009
Messages
380
You know... not just members can see the map link and "click" it, visitors allowed too...
and when they open that map, they would say "oh... this spell is cool and FREE... i must crab it to my MAP! :goblin_good_job:"
and then the credits of their map will be: "Credits: NONE" :ogre_rage:
LOL :ogre_hurrhurr:

ok, no one is "trust-able" ... as far as i see in my life... so ... beware :ogre_haosis:
 
Level 4
Joined
Jul 17, 2011
Messages
55
i'll code this for you tomorrow, currently not using a computer that has wc3.. it's fairly easy though, as said above..

here's a PSEUDOCODE below:

  • Events
    • Unit - Starts the effect of an ability
  • Conditions
    • Ability Being casted Equals "YOUR SPELL HERE"
  • Actions
    • tempLoc = Unit Position of Triggering Unit
    • Units = All units within 900 radius from tempLoc
    • Unit Group - Pick every unit in Units and do actions
      • Unit - Add ability Permanent Invisibility to Units
it should go something like that. of course, that doesn't give the duration on how long the buff should last, and the conditions aren't right. but it should give you an idea.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
If this hasn't been done by the time I wake up, I'll do it for you. Should take me like 5 minutes. It's just that it's nearly 5:30am and my ability to focus is nil.

EDIT: So much for it taking five minutes. For some odd reason it wouldn't work as intended. I probably made a silly mistake, but it made me angry and I just closed out the map. lol. Sorry, mate.

This is why I don't normally do spells. I figured I could get this one to work :(
 
Last edited:
Status
Not open for further replies.
Top