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

[Spell] Mui .?

Status
Not open for further replies.
Level 4
Joined
Mar 1, 2014
Messages
68
Hey i need some help :( i have read the tutorial for MUI so i create a simple ability to test it but it doesnt work.. I know there is something wrong.. can you figure it out ?

  • Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • INDEX[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Timer <gen>
        • Else - Actions
          • Set INDEX[1] = (INDEX[1] + 1)
          • Set INDEX[2] = (INDEX[2] + 1)
          • Set LoopCheck[INDEX[2]] = True
          • Set Real[INDEX[2]] = 10.00
          • Unit - Create 1 Footman for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
          • Set Dummy[INDEX[2]] = (Last created unit)
This is the run trigger:

  • Timer
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer INDEX[3]) from 1 to INDEX[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • LoopCheck[INDEX[3]] Equal to True
            • Then - Actions
              • Set Real[INDEX[3]] = (Real[INDEX[3]] - 0.01)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Real[INDEX[3]] Less than or equal to 0.00
                • Then - Actions
                  • Unit - Kill Dummy[INDEX[3]]
                  • Set LoopCheck[INDEX[3]] = False
                  • Set INDEX[1] = (INDEX[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • INDEX[1] Equal to 0
                    • Then - Actions
                      • Set INDEX[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
            • Else - Actions
any answer will be accepted :grin:
 
Level 12
Joined
Oct 16, 2010
Messages
680
umm okay not sure of the exact problem but this is a mess:/
this should look like

  • effect
    • Events
      • any
    • Conditions
      • any
    • Actions
      • Set Index = Index+1
      • Set data1[Index] = something
      • Set data2[Index] = something
        • ...etc...
      • If (all con are true) then
        • If - Conditions
          • Index == 0
        • Then - Actions
          • Trigger - Turn on Loop<gen>
        • Else - Actions
  • Loop
    • Events
      • Time - every 0.03 of game time ( 0.01 is too much, 0.03 is just enough)
    • Conditions
    • Actions
      • For each LoopInteger from 1 to Index, do
        • Loop - Actions
          • do here what you want
          • ...
          • when an instance is over just do
          • Set Index = Index-1
          • end check
          • If (all con are true) then
            • If - Conditions
              • Index == 0
            • Then - Actions
              • Trigger - Turn off this trigger
            • Else - Actions
EDIT:
  • effect
    • Events
      • Unit - starts the effect of an abil
    • Conditions
      • (ability being cast) equals to TC
    • Actions
      • Set Index = Index+1
      • Set duration[index] = 10
      • Unit - Create 1 footman ....
      • Set dummy[index] = (last created unit)
      • If (all con are true) then
        • If - Conditions
          • Index equals to 0
        • Then - Actions
          • Trigger - Turn on Loop<gen>
        • Else - Actions
  • Loop
    • Events
      • Time - every 0.03 of game time ( 0.01 is too much, 0.03 is just enough)
    • Conditions
    • Actions
      • For each LoopInteger from 1 to Index, do
        • Loop - Actions
          • Set duration[LoopInteger] = duration[LoopInteger]-0.03
          • If (all con are true then
            • If - Conditions
              • duration[LoopInteger] <= 0
            • Then - Actions
              • Unit - Kill dummy[LoopInteger]
              • Set Index = Index-1
            • Else - Actions
          • If (all con are true) then
            • If - Conditions
              • Index == 0
            • Then - Actions
              • Trigger - Turn off this trigger
            • Else - Actions
 
Status
Not open for further replies.
Top