• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Is it required that custom abilities must be in MUI only?

Status
Not open for further replies.
Level 26
Joined
Aug 18, 2009
Messages
4,099
I do not know if it's a must in your case but achieving MUIness is natural when dealing in object-oriented programming paradigms. Your code gains a structure and you arrange the data close to where it belongs to with access restrictions etc.

But in GUI your possibilities are quite limited. Actually you should always try to narrow things down the furthest like a variable is visible where it is used, yet in GUI there are only global variables and like no scoping options. I guess that makes it harder to think in objects.

Of course I would also consider local variable + wait as MUI but that's quite rubbish.
 
Level 3
Joined
Sep 9, 2015
Messages
56
Reply to Waterknight

I do not know if it's a must in your case but achieving MUIness is natural when dealing in object-oriented programming paradigms. Your code gains a structure and you arrange the data close to where it belongs to with access restrictions etc.

But in GUI your possibilities are quite limited. Actually you should always try to narrow things down the furthest like a variable is visible where it is used, yet in GUI there are only global variables and like no scoping options. I guess that makes it harder to think in objects.

Of course I would also consider local variable + wait as MUI but that's quite rubbish.

And now does it mean that MUI are only for spells with waits?
then GUI for basic triggers like this:

  • Territorialist Extirpate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Extirpate
    • Actions
      • Set Z_Battler = (Triggering unit)
      • Set Z_Battletarget = (Target unit of ability being cast)
      • Set Z_Battlerpos = (Position of Z_Battler)
      • Unit - Move Z_Battler instantly to (Random point in (Playable map area))
      • Unit - Move Z_Battletarget instantly to ((Position of Z_Battler) offset by 20.00 towards (Facing of Z_Battler) degrees)
      • Animation - Play Z_Battler's attack animation
      • Animation - Play Z_Battletarget's attack animation
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Extirpate for Z_Battler) Equal to 1
        • Then - Actions
          • Unit - Cause Z_Battler to damage Z_Battletarget, dealing 100.00 damage of attack type Spells and damage type Normal
          • Unit - Cause Z_Battletarget to damage Z_Battler, dealing 25.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Extirpate for Z_Battler) Equal to 2
        • Then - Actions
          • Unit - Cause Z_Battler to damage Z_Battletarget, dealing 150.00 damage of attack type Spells and damage type Normal
          • Unit - Cause Z_Battletarget to damage Z_Battler, dealing 25.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Extirpate for Z_Battler) Equal to 3
        • Then - Actions
          • Unit - Cause Z_Battler to damage Z_Battletarget, dealing 200.00 damage of attack type Spells and damage type Normal
          • Unit - Cause Z_Battletarget to damage Z_Battler, dealing 25.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • Wait 1.00 seconds
      • Unit - Move Z_Battler instantly to (Random point in (Playable map area))
      • Unit - Move Z_Battletarget instantly to ((Position of Z_Battler) offset by 20.00 towards (Facing of Z_Battler) degrees)
      • Animation - Play Z_Battler's attack animation
      • Animation - Play Z_Battletarget's attack animation
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Extirpate for Z_Battler) Equal to 1
        • Then - Actions
          • Unit - Cause Z_Battler to damage Z_Battletarget, dealing 100.00 damage of attack type Spells and damage type Normal
          • Unit - Cause Z_Battletarget to damage Z_Battler, dealing 25.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Extirpate for Z_Battler) Equal to 2
        • Then - Actions
          • Unit - Cause Z_Battler to damage Z_Battletarget, dealing 150.00 damage of attack type Spells and damage type Normal
          • Unit - Cause Z_Battletarget to damage Z_Battler, dealing 25.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Extirpate for Z_Battler) Equal to 3
        • Then - Actions
          • Unit - Cause Z_Battler to damage Z_Battletarget, dealing 200.00 damage of attack type Spells and damage type Normal
          • Unit - Cause Z_Battletarget to damage Z_Battler, dealing 25.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • Wait 1.00 seconds
      • Unit - Move Z_Battler instantly to (Random point in (Playable map area))
      • Unit - Move Z_Battletarget instantly to ((Position of Z_Battler) offset by 20.00 towards (Facing of Z_Battler) degrees)
      • Animation - Play Z_Battler's attack animation
      • Animation - Play Z_Battletarget's attack animation
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Extirpate for Z_Battler) Equal to 1
        • Then - Actions
          • Unit - Cause Z_Battler to damage Z_Battletarget, dealing 100.00 damage of attack type Spells and damage type Normal
          • Unit - Cause Z_Battletarget to damage Z_Battler, dealing 25.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Extirpate for Z_Battler) Equal to 2
        • Then - Actions
          • Unit - Cause Z_Battler to damage Z_Battletarget, dealing 150.00 damage of attack type Spells and damage type Normal
          • Unit - Cause Z_Battletarget to damage Z_Battler, dealing 25.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Extirpate for Z_Battler) Equal to 3
        • Then - Actions
          • Unit - Cause Z_Battler to damage Z_Battletarget, dealing 200.00 damage of attack type Spells and damage type Normal
          • Unit - Cause Z_Battletarget to damage Z_Battler, dealing 25.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • Wait 1.00 seconds
      • Unit - Move Z_Battler instantly to Z_Battlerpos
      • Unit - Move Z_Battletarget instantly to ((Position of Z_Battler) offset by 20.00 towards (Facing of Z_Battler) degrees)
 
Level 26
Joined
Aug 18, 2009
Messages
4,099
No, MUI means you can have multiple instances of a thing running at the same time. Those overlappings can also emerge through recursion or racing conditions (ok, less in wc3). Most obvious it's with non-instantaneous life cycles, yes. And you need them like everywhere in a real-time game.
 
Status
Not open for further replies.
Top