Gui mui help

comparami

New Member
Reaction score
4
guys, can you tell me whats wrong with my trigger?? im trying to make a spell similar to Shiva's Guard in the one in DotA.

here's my problem, the dummie's created move outwards of the character right? but, i need them to cast frost nova, i tried doing that by adding them to a group, but i noticed that, the group that the picked unit was added, was the group only for that specific dummy, but there's 36 dummies, which means that it will get damaged multiple times.
Trigger:
  • Frigid Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frigid Blast
    • Actions
      • Set CurrentIndex[1] = (CurrentIndex[1] + 1)
      • Set CurrentCaster[CurrentIndex[1]] = (Triggering unit)
      • For each (Integer A) from 1 to 36, do (Actions)
        • Loop - Actions
          • Set CurrentIndex[2] = (CurrentIndex[2] + 1)
          • Set CurrentCasterLoc[CurrentIndex[2]] = (Position of (Triggering unit))
          • Unit - Create 1 Frigid Blast (Dummy 01) for (Owner of CurrentCaster[CurrentIndex[1]]) at (CurrentCasterLoc[CurrentIndex[1]] offset by 25.00 towards (10.00 x (Real((Integer A)))) degrees) facing (10.00 x (Real((Integer A)))) degrees
          • Set CurrentDummy[CurrentIndex[2]] = (Last created unit)


Trigger:
  • Frigid Start
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer CurrentIndex[3]) from 1 to CurrentIndex[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CurrentLoop[CurrentIndex[3]] Equal to False
            • Then - Actions
              • Set Offset[CurrentIndex[3]] = (Offset[CurrentIndex[3]] + 25)
              • Unit - Move CurrentDummy[CurrentIndex[3]] instantly to (CurrentCasterLoc[CurrentIndex[3]] offset by (Real(Offset[CurrentIndex[3]])) towards (Facing of CurrentDummy[CurrentIndex[3]]) degrees)
              • Set CurrentLoop[CurrentIndex[3]] = True
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is in CurrentGroup[CurrentIndex[3]]) Equal to False
                  • ((Picked unit) belongs to an enemy of (Owner of CurrentDummy[CurrentIndex[3]])) Equal to True
                • Then - Actions
                  • Unit Group - Add (Picked unit) to CurrentGroup[CurrentIndex[3]]
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • IndexLoop[CurrentIndex[3]] Less than or equal to 10
                • Then - Actions
                  • Set Offset[CurrentIndex[3]] = (Offset[CurrentIndex[3]] + 25)
                  • Set IndexLoop[CurrentIndex[3]] = (IndexLoop[CurrentIndex[3]] + 1)
                  • Unit - Move CurrentDummy[CurrentIndex[3]] instantly to (CurrentCasterLoc[CurrentIndex[3]] offset by (Real(Offset[CurrentIndex[3]])) towards (Facing of CurrentDummy[CurrentIndex[3]]) degrees)
                  • Set CurrentLoop[CurrentIndex[3]] = False
                • Else - Actions
                  • Unit - Kill CurrentDummy[CurrentIndex[3]]
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
If unit gets damaged
1 add him to a unit group (new one)
2 next time before you damage check if unit in unit group epual to false :D
 

comparami

New Member
Reaction score
4
haha, thanks, but, i tried doing that, but i dont know how to make a single group for all of the dummies because of the loop.
Trigger:
  • For each (Integer CurrentIndex[3]) from 1 to CurrentIndex[2], do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CurrentLoop[CurrentIndex[3]] Equal to False
        • Then - Actions
          • Set Offset[CurrentIndex[3]] = (Offset[CurrentIndex[3]] + 25)
          • Unit - Move CurrentDummy[CurrentIndex[3]] instantly to (CurrentCasterLoc[CurrentIndex[3]] offset by (Real(Offset[CurrentIndex[3]])) towards (Facing of CurrentDummy[CurrentIndex[3]]) degrees)
          • Set CurrentLoop[CurrentIndex[3]] = True
          • Unit Group - Pick every unit in (Units within 125.00 of (Position of CurrentDummy[CurrentIndex[3]])) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is in CurrentGroup[(Player number of (Owner of CurrentDummy[CurrentIndex[3]]))]) Equal to False
                  • ((Picked unit) belongs to an enemy of (Owner of CurrentDummy[CurrentIndex[3]])) Equal to True
                • Then - Actions
                  • Unit Group - Add (Picked unit) to CurrentGroup[(Player number of (Owner of CurrentDummy[CurrentIndex[3]]))]
                  • Unit - Create 1 Albatross for (Owner of CurrentDummy[CurrentIndex[3]]) at (Position of (Picked unit)) facing Default building facing degrees
                  • Unit - Add a 1.10 second Generic expiration timer to (Last created unit)
                  • Unit - Add Frigid Blast (Dummy) to (Last created unit)
                  • Unit - Order (Last created unit) to Undead Lich - Frost Nova (Picked unit)
                  • Unit - Hide (Last created unit)
                • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IndexLoop[CurrentIndex[3]] Less than or equal to 10
            • Then - Actions
              • Set Offset[CurrentIndex[3]] = (Offset[CurrentIndex[3]] + 25)
              • Set IndexLoop[CurrentIndex[3]] = (IndexLoop[CurrentIndex[3]] + 1)
              • Unit - Move CurrentDummy[CurrentIndex[3]] instantly to (CurrentCasterLoc[CurrentIndex[3]] offset by (Real(Offset[CurrentIndex[3]])) towards (Facing of CurrentDummy[CurrentIndex[3]]) degrees)
              • Set CurrentLoop[CurrentIndex[3]] = False
            • Else - Actions
              • Unit - Kill CurrentDummy[CurrentIndex[3]]


well thanks anyways, :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top