• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help me make this Spell MUI

Status
Not open for further replies.
Level 7
Joined
Apr 18, 2010
Messages
102
The skills is like an omnislash, the user picks a target and dashes to it many times. If the target dies while there are still remaining slashes, the user chooses another target within a certain aoe. Im in the process of beautifying the spell but when i used another unit in conjuction with it, the spell bugs like it is not MUI.. Here are the triggers


  • Ult
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ulti
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Ult Loop <gen>
        • Else - Actions
      • Set MUI_Index[1] = (MUI_Index[1] + 1)
      • Set MUI_Index[2] = (MUI_Index[2] + 1)
      • Set Caster[MUI_Index[2]] = (Triggering unit)
      • Set Target[MUI_Index[2]] = (Target unit of ability being cast)
      • Set Level[MUI_Index[2]] = (Level of Ulti for Caster[MUI_Index[2]])
      • Set Count[MUI_Index[2]] = 6
      • Set Boolean[MUI_Index[2]] = True
      • Unit - Make Caster[MUI_Index[2]] Invulnerable
      • Custom script: call SetUnitTurnSpeed(udg_Caster[udg_MUI_Index[2]], 999999)
      • Set Offset[MUI_Index[2]] = 60.00
      • Animation - Change Caster[MUI_Index[2]]'s animation speed to 250.00% of its original speed
      • Unit - Turn collision for Caster[MUI_Index[2]] Off
      • Set Wait[MUI_Index[2]] = 0
  • Ult Loop
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • For each (Integer MUI_Index[3]) from 1 to MUI_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Boolean[MUI_Index[3]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Count[MUI_Index[3]] Greater than 0
                  • (Caster[MUI_Index[3]] is alive) Equal to True
                  • (Target[MUI_Index[3]] is visible to (Owner of Caster[MUI_Index[3]])) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Wait[MUI_Index[3]] Equal to 0
                    • Then - Actions
                      • Set CasterLoc = (Position of Caster[MUI_Index[3]])
                      • Set TargetLoc = (Position of Target[MUI_Index[3]])
                      • Set Angle[MUI_Index[3]] = (Angle from CasterLoc to TargetLoc)
                      • Set TargetLoc2 = (TargetLoc offset by 210.00 towards (Angle[MUI_Index[3]] + Real[MUI_Index[3]]) degrees)
                      • Set Distance[MUI_Index[3]] = (Distance between CasterLoc and TargetLoc)
                      • Custom script: call RemoveLocation(udg_TargetLoc)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Distance[MUI_Index[3]] Less than or equal to 375.00
                        • Then - Actions
                          • Custom script: call SetUnitAnimationByIndex(udg_Caster[udg_MUI_Index[3]],2)
                          • Animation - Change Caster[MUI_Index[3]]'s animation speed to 275.00% of its original speed
                          • Set Offset[MUI_Index[3]] = 30.00
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Distance[MUI_Index[3]] Less than or equal to 200.00
                        • Then - Actions
                          • Animation - Change Caster[MUI_Index[3]]'s animation speed to 700.00% of its original speed
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Distance[MUI_Index[3]] Greater than 75.00
                        • Then - Actions
                          • Set TargetLoc = (CasterLoc offset by Offset[MUI_Index[3]] towards Angle[MUI_Index[3]] degrees)
                          • Custom script: call SetUnitX(udg_Caster[udg_MUI_Index[3]],GetLocationX(udg_TargetLoc))
                          • Custom script: call SetUnitY(udg_Caster[udg_MUI_Index[3]],GetLocationY(udg_TargetLoc))
                        • Else - Actions
                          • Set Wait[MUI_Index[3]] = 12
                          • Set Damage[MUI_Index[3]] = ((75.00 + (25.00 x (Real(Level[MUI_Index[3]])))) + ((Random real number between 25.00 and 31.00) + (Real((Agility of Caster[MUI_Index[3]] (Include bonuses))))))
                          • Custom script: call SetUnitX(udg_Caster[udg_MUI_Index[3]],GetLocationX(udg_TargetLoc2))
                          • Custom script: call SetUnitY(udg_Caster[udg_MUI_Index[3]],GetLocationY(udg_TargetLoc2))
                          • Unit - Cause Caster[MUI_Index[3]] to damage Target[MUI_Index[3]], dealing Damage[MUI_Index[3]] damage of attack type Hero and damage type Normal
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Target[MUI_Index[3]] is dead) Equal to True
                            • Then - Actions
                              • Set Group = (Units within 500.00 of CasterLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is visible to (Owner of Caster[MUI_Index[3]])) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A H
                              • Set Target[MUI_Index[3]] = (Random unit from Group)
                              • Custom script: call DestroyGroup(udg_Group)
                            • Else - Actions
                      • Custom script: call RemoveLocation(udg_CasterLoc)
                      • Custom script: call RemoveLocation(udg_TargetLoc)
                      • Custom script: call RemoveLocation(udg_TargetLoc2)
                      • Set Distance[MUI_Index[3]] = 0.00
                      • Set Angle[MUI_Index[3]] = 0.00
                    • Else - Actions
                      • Set Wait[MUI_Index[3]] = (Wait[MUI_Index[3]] - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Wait[MUI_Index[3]] Equal to 9
                        • Then - Actions
                          • Animation - Change Caster[MUI_Index[3]]'s animation speed to 0.00% of its original speed
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Wait[MUI_Index[3]] Equal to 3
                        • Then - Actions
                          • Animation - Change Caster[MUI_Index[3]]'s animation speed to 999999.00% of its original speed
                          • Set CasterLoc = (Position of Caster[MUI_Index[3]])
                          • Set TargetLoc = (Position of Target[MUI_Index[3]])
                          • Set Angle[MUI_Index[3]] = (Angle from CasterLoc to TargetLoc)
                          • Set Real[MUI_Index[3]] = (Random real number between -36.00 and 36.00)
                          • Custom script: call SetUnitFacing(udg_Caster[udg_MUI_Index[3]], udg_Angle[udg_MUI_Index[3]])
                          • Custom script: call RemoveLocation(udg_CasterLoc)
                          • Custom script: call RemoveLocation(udg_TargetLoc)
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Wait[MUI_Index[3]] Equal to 0
                        • Then - Actions
                          • Set Offset[MUI_Index[3]] = 60.00
                          • Animation - Change Caster[MUI_Index[3]]'s animation speed to 250.00% of its original speed
                          • Custom script: call SetUnitAnimationByIndex(udg_Caster[udg_MUI_Index[3]],6)
                          • Animation - Reset Caster[MUI_Index[3]]'s animation
                          • Set Count[MUI_Index[3]] = (Count[MUI_Index[3]] - 1)
                        • Else - Actions
                • Else - Actions
                  • Set Boolean[MUI_Index[3]] = False
            • Else - Actions
              • Custom script: call SetUnitTurnSpeed(udg_Caster[udg_MUI_Index[3]], GetUnitDefaultTurnSpeed(udg_Caster[udg_MUI_Index[3]]))
              • Unit - Make Caster[MUI_Index[3]] Vulnerable
              • Unit - Turn collision for Caster[MUI_Index[3]] On
              • Unit - Order Caster[MUI_Index[3]] to Stop
              • Animation - Reset Caster[MUI_Index[3]]'s animation
              • Animation - Change Caster[MUI_Index[3]]'s animation speed to 100.00% of its original speed
              • Set Caster[MUI_Index[3]] = No unit
              • Set Target[MUI_Index[3]] = No unit
              • Set Level[MUI_Index[3]] = 0
              • Set Count[MUI_Index[3]] = 0
              • Set Wait[MUI_Index[3]] = 0
              • Set MUI_Index[1] = (MUI_Index[1] - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MUI_Index[1] Equal to 0
                • Then - Actions
                  • Set MUI_Index[2] = 0
                  • Trigger - Turn off (This trigger)
                • Else - Actions

the problem is when 2 unit cast it, the number of attacks are shared and 1 unit becomes vulnerable at the end while the other doesnt.
 
Last edited by a moderator:
I think Display - Text messages could help you with this, as debug.
Display the values of variables (that are bugged), after you set/changed them. If the value seems strange or wrong you easily can see in which part this happens.

Also you are using this:
  • Custom script: call SetUnitAnimationByIndex(udg_Caster[udg_MUI_Index[3]],6)
I think it's not MUI, because unit animation index can difffer.. depends on which unit type is casting.
 
Status
Not open for further replies.
Top