Gui --> mui

ImmortaL_GoD

New Member
Reaction score
4
How would I convert a trigger like this to MUI:

Code:
Vanish
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Vanish (Maiden)
    Actions
        Set p[1] = (Position of (Triggering unit))
        Set p[2] = (Target point of ability being cast)
        Unit - Create 1 Dummy Vanish for (Owner of (Triggering unit)) at p[1] facing p[2]
        Set Vanish = (Last created unit)
        Unit - Order Vanish to Orc Tauren Chieftain - Shockwave p[2]
        Unit - Add a 2.00 second Generic expiration timer to Vanish
        Custom script: call RemoveLocation (udg_p[1])
        Custom script: call RemoveLocation (udg_p[2])
 

UndeadDragon

Super Moderator
Reaction score
447
I think it's already MUI.
 

Prediter[BuB

Well-Known Member
Reaction score
35
Not MUI but a real simple change. All you have to do is create a variable titles customvalue.
Then:
Code:
Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            Customvalue Less than 1000
        Then - Actions
            Set Customvalue = (Customvalue + 1)
        Else - Actions
            Set Customvalue = 1

Then set all your non temp variables to integer 1000 using customvalue

any trigger without a wait is mui

Totally untrue
 

Flare

Stops copies me!
Reaction score
662
It's MUI as it is, there's no need to surefire-MUI-ize is, since it's not going to change anything except maybe your opinion on GUI :p

any trigger without a wait is mui
Totally untrue
Back yourself up, show me your proof.
1) If it's a single trigger, without any waits, it's probably going to be MUI
2) It it's a single trigger with a wait, it's possible to make it MUI, but the types of abilities that can be made MUI with a wait are very few in number (primarily, AoE damage around the caster, that's only one I can think of at the moment)
3) If there's more than one trigger, it's more than likely not MUI

Not MUI but a real simple change
Bullsh*t - that method is extensive, awkward at the best of times and boring as hell.
 

Prediter[BuB

Well-Known Member
Reaction score
35
I didn't say it was going to be a blasty blast. So get off my back Galileo Humpkins (psych reference to Gus) And with his trigger its not that extensive. PS Thanks for the MUI tutorial flare :)
 

Romek

Super Moderator
Reaction score
963
Timer based ones include waits. (Timers are waits).
 

BarzahdX

Active Member
Reaction score
18
This the perfect thread to ask one of my long-time questions, what is MUI, what causes it, and why is it important? I figure this isn't off-topic...
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
This the perfect thread to ask one of my long-time questions, what is MUI, what causes it, and why is it important? I figure this isn't off-topic...

i dont know if it stands for this but im guessing
multiple unit instances
it's a spell that allows more than 1 unit to cast it at the same time
like if you have a wait action, the kill all the units,
within that wait time, another unit can cast the spell and mess the trigger up
especially when you're using triggering unit and last created unit
ill show you
Code:
Untitled Trigger 001
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Ability being cast) Equal to Animate Dead
    Actions
        Unit - Create 1 Dummy for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        Wait 100.00 seconds
        Unit - Order (Last created unit) to Human Archmage - Blizzard (Center of (Playable map area))
if i used animated dead in that 100 seconds, then the first dummy unit wont do anything
 

Romek

Super Moderator
Reaction score
963
especially when you're using triggering unit and last created unit

Actually, triggering unit survives past waits.

So:
Unit finishes spell
Order triggering unit to Blah
Wait 10
Order Triggering unit to stop

Will work fine.

It's mostly the lastcreatedblah() which make things not MUI.
 

BarzahdX

Active Member
Reaction score
18
Ohhh! Ok, thank you very much! Now, using your example "YourFace".. If you set the last created unit to a unit variable array, would that fix the problem?
 

Samael88

Evil always finds a way
Reaction score
181
Ohhh! Ok, thank you very much! Now, using your example "YourFace".. If you set the last created unit to a unit variable array, would that fix the problem?

Yes, it can, but not in the long run.

The thing that the predator guy tried to do is some kind indexing.
You use the customvalue of a unit to attach other values to it.
OR attach the unit to an array. Either way is fine by me:p

But the important thing is this(long run problem):

You set the units for that thing to an array. the max number for an array is 4096 I think of something like that. And when you get to that number wich you must do sometime you can't just start over beacuse there can still be some units using the first slots. That is why people use attachement systems and PUI(Perfect unit Indexing) i think there is a system called that, to check for open values and stuff.

YourFace:
MUI=Multi Unit Instancable
Wich means that it can be used to deal with multiple units at the same time.
MPI=Multi Player Instancable
Wich means that it can be used to deal with one unit per player at the same time.

Note:
What the predator guy said it won't make anything MUI. it will only work with up to a 1000 instances, and naming a variable to custom value and counting to 1000 without a event will not do anything at all for that matter:eek:
 

Strilanc

Veteran Scripter
Reaction score
42
Back yourself up, show me your proof.

Typically when people say that they're talking about globals not acting like locals when you expect them to. For example your trigger might fire itself and change some globals, whereas locals from JASS can't change in such weird ways.

Code:
Event:
unit enters map
Conditions:
upgraded grunt is researched
Actions:
//replace grunts with upgraded grunts
set temp_unit = triggering unit
if type of temp_unit == grunt then
  create an upgraded grunt
  remove temp_unit //oh no! you just removed the upgraded grunt instead of the grunt!
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Ohhh! Ok, thank you very much! Now, using your example "YourFace".. If you set the last created unit to a unit variable array, would that fix the problem?

Not unless it is a local variable (JASS only). If the trigger runs again, while the first one is still waiting, it will overwrite the variable with the new unit, and make nothing happen with the old one, and make stuff happen twice with the new one.
 
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