• 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.

[Trigger] How to make it MUI?

Status
Not open for further replies.
Level 7
Joined
Mar 6, 2014
Messages
203
  • Demacia
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Set Index = (Index + 1)
      • Set Caster[Index] = (Triggering unit)
      • Set Target[Index] = (Target unit of ability being cast)
      • Set TargetLoc[Index] = (Position of Target[Index])
      • Set CasterLoc[Index] = (Position of Caster[Index])
      • Set FissureLoc[Index] = (TargetLoc[Index] offset by 250.00 towards (30.00 x (Real((Integer A)))) degrees)
      • Unit - Add Storm Crow Form to Caster[Index]
      • Unit - Remove Storm Crow Form from Caster[Index]
      • Unit - Turn collision for Caster[Index] Off
      • Unit - Create 1 Peon for (Owner of Caster[Index]) at CasterLoc[Index] facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to DIDummyGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Demacia Loop <gen>
        • Else - Actions
  • Demacia Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Index_Copy) from 1 to Index, do (Actions)
        • Loop - Actions
          • Set DICustomValue[Index_Copy] = 1
          • Set Height[Index_Copy] = (Height[Index_Copy] + 10.00)
          • Set TargetLoc[Index_Copy] = (Position of Target[Index_Copy])
          • Set CasterLoc[Index_Copy] = (Position of Caster[Index_Copy])
          • Set TempLoc[Index_Copy] = (CasterLoc[Index_Copy] offset by 35.00 towards (Angle from CasterLoc[Index_Copy] to TargetLoc[Index_Copy]) degrees)
          • Animation - Change Caster[Index_Copy] flying height to Height[Index_Copy] at 500.00
          • Unit - Move Caster[Index_Copy] instantly to TempLoc[Index_Copy]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between CasterLoc[Index_Copy] and TargetLoc[Index_Copy]) Less than or equal to 150.00
            • Then - Actions
              • Animation - Change Caster[Index_Copy] flying height to 0.00 at 1000.00
              • For each (Integer A) from 1 to 30, do (Actions)
                • Loop - Actions
                  • Set FissureLoc[Index_Copy] = (TargetLoc[Index_Copy] offset by 250.00 towards (30.00 x (Real((Integer A)))) degrees)
                  • Destructible - Create a Fissure at FissureLoc[Index_Copy] facing (Random angle) with scale 1.00 and variation 0
                  • Set Fissure[(DICustomValue[Index_Copy] x (30 + (Integer A)))] = (Last created destructible)
              • Unit - Turn collision for Caster[Index_Copy] On
              • Set Height[Index_Copy] = Height[Index]
              • Set TargetLoc[Index_Copy] = TargetLoc[Index]
              • Set CasterLoc[Index_Copy] = CasterLoc[Index]
              • Set TempLoc[Index_Copy] = TempLoc[Index]
              • Set FissureLoc[Index_Copy] = FissureLoc[Index]
              • Set Caster[Index_Copy] = Caster[Index]
              • Set Target[Index_Copy] = Target[Index]
              • Set Index = (Index - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
  • Demacia Rmove
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in DIDummyGroup) Equal to True
    • Actions
      • Set Index_Copy = (Index_Copy - 1)
      • For each (Integer A) from 1 to 30, do (Actions)
        • Loop - Actions
          • Destructible - Remove Fissure[(DICustomValue[Index_Copy] x (30 + (Integer A)))]
      • Set DICustomValue[Index_Copy] = DICustomValue[Index]
      • Unit - Remove (Picked unit) from the game

The problem is the destructible cant remove when 2 or more cast it when only 1 is cast the spell is good.

PS: I KNOW THEIR IS LEAKS IN POINT

Please check if i got error you can download the map
 

Attachments

  • 123213.w3x
    19.3 KB · Views: 90
Level 22
Joined
Sep 24, 2005
Messages
4,821
Try using a hastable to attach the destructables to the caster so that you can retrieve them on the caster's death.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Well, I guess you wanted to use a integer A loop at first trigger but you seem forgot it...
 
Status
Not open for further replies.
Top