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

[Solved] Moonlight Shadow Not working

Status
Not open for further replies.
Level 5
Joined
Nov 4, 2011
Messages
64
I am creating a map called battle 4 ways. In that map i am adding dota hero called Mirana Night Shade. The problem is that heroes ultimate is not working. I dont Know what is the problem but i think there might be a problem in trigger.
The spell is like this
Moonlight Shadow :-
Turns Nightshade and all allied heroes invisible. If Invisibility is broken, it gets restored after the fade time during the shadow duration.

Lasts 11 Seconds.

Level 1 - 2.5 Second Fade Time
Level 2 - 2.0 Second Fade Time
Level 3 - 1.5 Second Fade Time.


  • Moon light Shadow Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- //////////////////////////////////////MOONLIGHT SHADOW\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --------
      • -------- //THE ABILITY ID --------
      • Set MS_Ability = Moonlight Shadow
      • Set MS_Ability_Buff = MS_Invisibility
      • -------- ///////////////////////////////////// --------
      • -------- //The Special Effect of Moonlight Shadow --------
      • Set MSEffectPath = Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
      • -------- ///////////////////////////////////// --------
      • -------- //THE DURATION OF INVISIBILITY --------
      • Set MS_Duration = 11.00
      • -------- ///////////////////////////////////// --------
      • -------- ///////////Advanced --------
      • Hashtable - Create a hashtable
      • Set MS_Hashtable = (Last created hashtable)
      • -------- //////////////////////////////////////////////////////////////////////END OF MOONLIGHT SHADOW --------
  • MoonLightShadowCast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Moonlight Shadow
    • Actions
      • -------- //ONLY IF WHERE THERE ARE NO INSTANCES IT WILL START TRIGGER OF COUNTDOWN --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MS_MUI Equal to 0
        • Then - Actions
          • Trigger - Turn on MSTimer <gen>
        • Else - Actions
      • -------- ///////////////////////// --------
      • Set MS_MUI = (MS_MUI + 1)
      • Set MS_MUI_2 = (MS_MUI_2 + 1)
      • Set MS_Group[MS_MUI] = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Triggering unit)) is an ally of (Owner of (Matching unit))) Equal to True)))
      • Hashtable - Save 0.00 as 1 of (Key (Triggering unit)) in MS_Hashtable
      • Unit Group - Add (Triggering unit) to MS_Casting_Group
      • Unit Group - Pick every unit in MS_Group[MS_MUI] and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using MSEffectPath
          • Special Effect - Destroy (Last created special effect)
          • Unit - Add MS_Ability_Buff to (Picked unit)
          • Unit - Set level of MS_Ability_Buff for (Triggering unit) to (Level of MS_Ability for (Triggering unit))
  • Moon Light ShadowTimer
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in MS_Casting_Group and do (Actions)
        • Loop - Actions
          • Hashtable - Save ((Load 1 of (Key (Picked unit)) from (Last created hashtable)) + 1.00) as 1 of (Key (Picked unit)) in MS_Hashtable
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 1 of (Key (Picked unit)) from MS_Hashtable) Greater than MS_Duration
            • Then - Actions
              • For each (Integer A) from 1 to MS_MUI_2, do (Actions)
                • Loop - Actions
                  • Unit Group - Remove (Picked unit) from MS_Casting_Group
                  • Unit Group - Pick every unit in MS_Group[(Integer A)] and do (Actions)
                    • Loop - Actions
                      • Unit - Remove MS_Ability_Buff from (Picked unit)
                  • Set MS_MUI_2 = (MS_MUI_2 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MS_MUI_2 Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Set MS_MUI = 0
                • Else - Actions
            • Else - Actions
Problem :- when the moon light shadow ability casted all the hereos gain permanent invisibility. So help me please. (i know i suck in english Still help me)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Source of the spell. Be sure to give credits where due.
The problem is that heroes ultimate is not working.
How is it not working? Always specify this when trying to ask a question :p.

The problem might be the "(Last created hashtable)" in the second trigger, ("Save (blabla + 1) in last created hashtable").
Try replacing that with "MS_Hashtable" and test it.
 
Level 5
Joined
Nov 4, 2011
Messages
64
i specified the problem at last if read the post till the end.

actually your right Mr.ap0calypse i did as you said and the spell worked perfectly thanks for your help. thanks for every one who helped me to solve this thank you every one. :D
 
Last edited by a moderator:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Woah, I really didn't see that the first time I read your post. My apologies :p.
Maker is also correct by the way :). Otherwise the units will always have a 2.5-second fade time (unless I'm missing something).
Edit: you can test this by setting the fade time for level 1 to something ridiculously high (like 50 seconds), and the fade time for level 2 to something like 0.50 seconds. See what happens when the spell is cast at level 2.
 
Status
Not open for further replies.
Top