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

[Trigger] Need help with MUI

Status
Not open for further replies.
Level 2
Joined
May 7, 2010
Messages
21
I would like to learn how to make GUI spells MUI. I already checked most of the tutorials for MUI spellmaking with GUI triggers, but none of them seemed to work for my spell. Ive made a spell using some basic effects with multiple periodic triggers. Id appreciate any suggestions.
I know about the leaks, I didnt remove them because I wanted it to be just a test spell for learning how to make MUI spells. Disregard the first couple variables (Instances etc.), those were part of my last attempt at MUI. Guess I was too lazy to remove them :p .

Here are the triggers :

  • conespell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cone
    • Actions
      • Set NumberofInstances = (NumberofInstances + 1)
      • Set ActualInstance = (ActualInstance + 1)
      • Set NumberofInstances = (NumberofInstances + ActualInstance)
      • Set UnitID[ActualInstance] = (UnitID[ActualInstance] + 1)
      • Set caster[UnitID[ActualInstance]] = (Casting unit)
      • Set casterposition = (Position of caster[UnitID[ActualInstance]])
      • Animation - Change caster[UnitID[ActualInstance]] turn speed to 0.00
      • Set facingcaster = (Facing of caster[UnitID[ActualInstance]])
      • Trigger - Turn on periodic1 <gen>
      • Wait until ((periodic1 <gen> is on) Equal to False), checking every 0.10 seconds
      • Trigger - Turn on periodic2 <gen>
      • Wait until ((periodic2 <gen> is on) Equal to False), checking every 0.10 seconds
      • Trigger - Turn on periodic3 <gen>
      • Wait until ((periodic3 <gen> is on) Equal to False), checking every 0.10 seconds
      • Animation - Change caster[UnitID[ActualInstance]] turn speed to 1.00
      • Set ActualInstance = -1


  • periodic1
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set counter = (counter + 1.00)
      • Unit - Create 1 dmy for (Owner of caster[UnitID[ActualInstance]]) at (casterposition offset by (50.00 + (50.00 x counter)) towards (15.00 + facingcaster) degrees) facing facingcaster degrees
      • Unit - Add a (2.00 + (0.20 x counter)) second Generic expiration timer to (Last created unit)
      • Unit - Create 1 dmy for (Owner of caster[UnitID[ActualInstance]]) at (casterposition offset by (50.00 + (50.00 x counter)) towards (-15.00 + facingcaster) degrees) facing facingcaster degrees
      • Unit - Add a (2.00 + (0.20 x counter)) second Generic expiration timer to (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • counter Equal to 15.00
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set counter = 0.00
        • Else - Actions
  • periodic2
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set counter2 = (counter2 + 1.00)
      • Unit - Create 1 dmy for (Owner of caster[UnitID[ActualInstance]]) at ((casterposition offset by 750.00 towards (facingcaster + 15.00) degrees) offset by (22.00 x counter2) towards (facingcaster + 285.00) degrees) facing Default building facing degrees
      • Unit - Add a (2.00 + (0.20 x counter2)) second Generic expiration timer to (Last created unit)
      • Unit - Create 1 dmy for (Owner of caster[UnitID[ActualInstance]]) at ((casterposition offset by 750.00 towards (facingcaster - 15.00) degrees) offset by (22.00 x counter2) towards (facingcaster - 285.00) degrees) facing Default building facing degrees
      • Unit - Add a (2.00 + (0.20 x counter2)) second Generic expiration timer to (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • counter2 Equal to 9.00
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set counter2 = 0.00
        • Else - Actions
  • periodic3
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set counter3 = (counter3 + 1.00)
      • Unit - Create 1 dmy for (Owner of caster[UnitID[ActualInstance]]) at (casterposition offset by (750.00 - (50.00 x counter3)) towards facingcaster degrees) facing Default building facing degrees
      • Unit - Add a (2.00 + (0.20 x counter3)) second Generic expiration timer to (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • counter3 Equal to 13.00
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set counter3 = 0.00
        • Else - Actions
 

Attachments

  • testmap.w3x
    21.5 KB · Views: 42
Status
Not open for further replies.
Top