Tutorial GUI MUI Spell Making Guide

millzy

Ultra Cool Member
Reaction score
44
ok just so use know this is my first turtorial so please give feed back


What is MUI?
MUI is Multi-Unit-Instanceability.It means that if 2 or more units cause a trigger to fire (casting a spell would be best example), the spell's effect will work properly for both units that cast the ability. if the trigger wasent MUI the spell would only work for 1 of the units Also, MUI is basicly impossible to achieve with waits.



why use indexing for MUI spells?
it is easy and a great variable system used by many spell makers to make Multi Unit instancable spells.
there are 2 triggers but very small depending on how complex your spell is
What do you need to use it
nothing it isn't a custom script or anything like that it is simply a variable based system.
Can you make any spell in GUI MUI with this - the answer is yes.only custom script need is for removing leaks


what u will need first off is, you need to make a base ability in the Object Editor which will make the spell fire.

Basic Variables Used In Your Spell
index-a integer Variable[this is the integer variable you use for the indexing part of the spell
MUI-a integer Variable[used for the MUI part of the spell]
Loop-a integer variable used in the looping trigger for the spell
Turn on-(array)a Boolean Variable used for MUI part of the trigger as well

so what the index Variable does is increased and decreased when any units start or finish the spell

and the MUI variable is used for storing the unit/point and so on of the spell

the spell ill be doing for the turtoral of a MUI spell is a sliding spell slides the unit to target of the ability

the start of our trigger(and all MUI triggers in this style)
Trigger:
  • turt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • (Ability being cast) Equal to >your ability<
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Index Equal to 0
          • Then - Actions
            • Trigger - Turn on turt loop <gen>
          • Else - Actions
        • Set Index = (Index + 1)
        • Set MUI = (MUI + 1)
        • Set Turn_On[MUI] = True


setting the variables for this particular spell
caster-unit-the unit casting the spell(ARRAY)
casterpos-point-position of the casting unit
targetpoint-ppoint-pont of the ability being used
moved-real-the distance you traveled(ARRAY)
Distance-real-the distance your about to move(ARRAY)
angle-real-the angle(ARRAY)
slide 1-point-the point for sliding of the unit
slide 2-point-the point for sliding of the unit second part

ok now thats all over ill show you the end resault for the first trigger for this spell

Trigger:
  • GUI MUI SLIDE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • (Ability being cast) Equal to >your ability<
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Index Equal to 0
          • Then - Actions
            • Trigger - Turn on GUI MUI SLIDE loop <gen>
          • Else - Actions
        • Set MUI = (MUI + 1)
        • Set Index = (Index + 1)
        • Set Turn_On[MUI] = True
        • Set caster[MUI] = (Casting unit)
        • Set casterpos = (Position of caster[MUI])
        • Set target_point = (Target point of ability being cast)
        • Set distance[MUI] = (Distance between casterpos and target_point)
        • Set angle[MUI] = (Angle from casterpos to target_point)
        • Set moved[MUI] = 0.00
        • Unit - Pause caster[MUI]
        • Unit - Turn collision for caster[MUI] Off
        • Custom script: call RemoveLocation(udg_casterpos)
        • Custom script: call RemoveLocation(udg_target_point)


so what we got is when a hero casts an ability we add 1 counter(MUI) to the [ ] array of the hero ...

So hero one casts ability ... Set MUI = MUI + 1 >> Set Caster[MUI] = Casting unit....

>hero two casts ability ... Set MUI = MUI + 1 >> Set Caster[MUI] = Casting unit ...

So now as numbers in arrays we have .. Caster[1] and Caster[2] .. they have diffrent arrays so they will not overwrite each other meaning they are MUI..

So we use them in loops

in stead of using
Trigger:
  • For each (Integer A) from 1 to MUI, do (Actions)


we use this its easyer and integer A can have a bug at times and this is safer
Trigger:
  • For each (Integer loop) from 1 to MUI, do (Actions)



now notice in the trigger the arrays are no longer MUI there are loop
also the second trigger has initially off as for the first trigger turns it on and it is turned off when no units are using the trigger

Trigger:
  • GUI MUI SLIDE loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer loop) from 1 to MUI, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Turn_On[loop] Equal to True
            • Then - Actions
              • Set slide1 = (Position of caster[loop])
              • Set slide2 = (slide1 offset by 30.00 towards angle[loop] degrees)
              • Set moved[loop] = (moved[loop] + 30.00)
              • Special Effect - Create a special effect at slide2 using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Move caster[loop] instantly to slide2
              • Custom script: call RemoveLocation(udg_slide1)
              • Custom script: call RemoveLocation(udg_slide2)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((caster[loop] is dead) Equal to True) or (moved[loop] Greater than or equal to distance[loop])
                • Then - Actions
                  • -------- as for the spell is finished --------
                  • Set Index = (Index - 1)
                  • Unit - Unpause caster[loop]
                  • Unit - Turn collision for caster[loop] On
                  • -------- nulling the variables --------
                  • Set angle[loop] = 0.00
                  • Set caster[loop] = No unit
                  • Set distance[loop] = 0.00
                  • Set moved[loop] = 0.00
                  • Set moved[loop] = 0.00
                  • 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)
                      • Set MUI = 0
                      • -------- trigger no longer being used by any unit when the index is 0 --------
                      • -------- so the trigger is turned off then MUI set to 0 as for no units using that any more either --------
                    • Else - Actions
                • Else - Actions
            • Else - Actions


yes i know this is a basic spell but it is easy to show every one so that they get the concept. ill up date later on with a map to test and ill also be adding another spell or to to give use a better idea of this GUI MUI


CREDITS
thanks to "RMX" on hive for teaching me on how to use this.


here is my map it has the spell im showing in the this post and also a knockback spell
 

Romek

Super Moderator
Reaction score
963
...Another one of these..?
And I don't think this one is as detailed.

GUI MUI spells are quite easy now with Hashtables me thinks.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I can't see the reason why so many of these are made, especially considering that Flare already made one well detailed right here.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
It'd be nice if there wasn't one of these;
But since Flare made one..

You can't perfect perfection.


EDIT: Oh, and as mentioned, tag abuse all over :p .
 

Romek

Super Moderator
Reaction score
963
> Noones made one about abusing
Because noones stupid enough to do so? :p
 

millzy

Ultra Cool Member
Reaction score
44
...Another one of these..?
And I don't think this one is as detailed.

GUI MUI spells are quite easy now with Hashtables me thinks.



i havent seen one of these ways of GUI MUI around so i made


I can't see the reason why so many of these are made, especially considering that Flare already made one well detailed right here.

flares uses giving the units custom values where no need in this
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
> flares uses giving the units custom values where no need in this

Not entirely true, Flare gives a dummy unit a custom value, so any unit that stays in game for longer than the duraiton of your spell isn't affected at all with those custom values.
 

Sooda

Diversity enchants
Reaction score
318
More the better, there were so much time lack of GUI MUI tutorials. At last things are moving and indexing gets popularity. If one tutorial is unclear maybe other explains it better. Are not satisfied with result? Write your own, mean while this and other equivalents do their job.

We got wiki page of MUI on http://wiki.thehelper.net/wc3/MUI. Help to make it better.
 

millzy

Ultra Cool Member
Reaction score
44
More the better, there were so much time lack of GUI MUI tutorials. At last things are moving and indexing gets popularity. If one tutorial is unclear maybe other explains it better. Are not satisfied with result? Write your own, mean while this and other equivalents do their job.

so what are u saying there?
 
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