MUI (er....double arrays?)

PooBucket

New Member
Reaction score
12
Trying to make MUI, and I looked at a tutorial and uses custom value and arrays. Problem is mine already has an array and if I want to make MUI it'll have two arrays, therefore, overlap each other's values. This spell is every unit dies one charge and each charge releases 100 mana when ordered to.

Trigger:
  • Soul Harvest
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Soul Harvest for (Killing unit)) Equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SoulsHarve Not equal to 5
        • Then - Actions
          • Special Effect - Create a special effect attached to the (hand, left + hand, right) of (Killing unit) using Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl
          • Set SoulsHarve = (SoulsHarve + 1)
          • Set AmountSFXSouls[SoulsHarve] = (Last created special effect)
        • Else - Actions
          • Do nothing
      • Special Effect - Create a special effect attached to the origin of (Dying unit) using Abilities\Spells\Items\AIso\AIsoTarget.mdl
      • Special Effect - Destroy (Last created special effect)


Trigger:
  • Soul Crush
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Soul Crush
    • Actions
      • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + (100.00 x (Real(SoulsHarve))))
      • Special Effect - Create a special effect attached to the origin of (Casting unit) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
      • Special Effect - Destroy (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SoulsHarve Equal to 1
        • Then - Actions
          • Special Effect - Destroy AmountSFXSouls[SoulsHarve]
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SoulsHarve Equal to 2
            • Then - Actions
              • Special Effect - Destroy AmountSFXSouls[SoulsHarve]
              • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 1)]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SoulsHarve Equal to 3
                • Then - Actions
                  • Special Effect - Destroy AmountSFXSouls[SoulsHarve]
                  • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 1)]
                  • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 2)]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SoulsHarve Equal to 4
                    • Then - Actions
                      • Special Effect - Destroy AmountSFXSouls[SoulsHarve]
                      • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 1)]
                      • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 2)]
                      • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 3)]
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SoulsHarve Equal to 5
                    • Then - Actions
                      • Special Effect - Destroy AmountSFXSouls[SoulsHarve]
                      • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 1)]
                      • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 2)]
                      • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 3)]
                      • Special Effect - Destroy AmountSFXSouls[(SoulsHarve - 4)]
                    • Else - Actions
                      • Do nothing
      • Set SoulsHarve = 0


And if it's able to be cleaned up (2nd trigger) I'd really appreciate it :eek:
 

Bogrim

y hello thar
Reaction score
154
To make this MUI in a simple GUI way, do the following:

1. Instead of using the variable, "SoulsHarve", use the unit's Custom Value. --> Whenever the unit kills an enemy unit, increase its custom value by 1.

2. Instead of using special effects, use the Sphere ability with art attachments. Make 5 different versions and assign each to an ability array. Whenever the unit kills an enemy unit, remove Sphere[Custom Value] and add Sphere[Custom Value + 1]. Whenever the unit uses Soul Crush, remove Sphere[Custom Value] from the unit.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
1. Instead of using the variable, "SoulsHarve", use the unit's Custom Value. --> Whenever the unit kills an enemy unit, increase its custom value by 1.
Please, please never suggest someone set a unit's custom value themselves. Always, always encourage them to use a unit indexer and an array instead, because it is more flexible and more compatible.
 

PooBucket

New Member
Reaction score
12
To make this MUI in a simple GUI way, do the following:

1. Instead of using the variable, "SoulsHarve", use the unit's Custom Value. --> Whenever the unit kills an enemy unit, increase its custom value by 1.

2. Instead of using special effects, use the Sphere ability with art attachments. Make 5 different versions and assign each to an ability array. Whenever the unit kills an enemy unit, remove Sphere[Custom Value] and add Sphere[Custom Value + 1]. Whenever the unit uses Soul Crush, remove Sphere[Custom Value] from the unit.

Nono SoulsHarve is counting the charge amount.
And yes Sphere, I was trying to find it but I couldn't understand the Object Editor having all the different sphere sprites so I just chose Absorb Mana instead :eek:
I spsoe if i can get sphere, itd all work out with diff variables for each.
How does the sprite, one sprite two etc make it look different? And how can I get it in sfx?

And JASS is a bit complicated for me Weep :p
 

Bogrim

y hello thar
Reaction score
154
Nono SoulsHarve is counting the charge amount.
And yes Sphere, I was trying to find it but I couldn't understand the Object Editor having all the different sphere sprites so I just chose Absorb Mana instead :eek:
I spsoe if i can get sphere, itd all work out with diff variables for each.
How does the sprite, one sprite two etc make it look different? And how can I get it in sfx?

And JASS is a bit complicated for me Weep :p
To make a trigger MUI, you need to understand why it's not working for more than one unit.

In general, triggers respond to a unit's event. When you use multiple triggers for the same type of unit, the game can't tell if it's really the same unit using the ability. You need to "record" the unit using variables. That way you can make the triggers "remember" the unit and work together.

Now, the primary problem here is that you're using a variable that can only remember one thing at a time. So how do you make triggers that respond identically to a single unit but several units at the same time? That's the tricky part.

Weep suggested an advanced Jass system which allows you to assign a unique value to keep a "tracking number" of each unit.

But if that's too advanced for you, then follow my suggestion and use custom value. Custom value is a variable identical to your integer value, it can be used to count just the same, but the difference is that the variable is "attached" to a unit, meaning you don't have to worry about which variable belongs to which unit because the game keeps an automatic record of that.

Basically, every time you want to add a "stack", increase the unit's custom value by 1. Then the game will know it's that unit which has the variable and not any other.

Similar, the reason for I suggest you to use an ability to do your special effects is because the ability is also attached to the unit, meaning you don't need an indexing system to tell which unit the variable belongs to. If the unit has the ability, the game will know and you don't an advanced system to keep track of these things.
Please, please never suggest someone set a unit's custom value themselves. Always, always encourage them to use a unit indexer and an array instead, because it is more flexible and more compatible.
Not every poster understands these systems, Weep. You should realize that having done a GUI friendly version of the damage system.
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
Not every poster understands these systems, Weep. You should realize that having done a GUI friendly version of the damage system.
This is not the same. Ordinary damage systems require JASS in order to use them, that's why there is a legitimity for a GUI damage system.
Indexing systems, however, don't. Everyone with a brain larger than a cookie can use Indexing systems. You can not call this "advanced Jass system", as you do not have to make any change to it at all.

At least tell him to use a hashtable instead of ugly workarounds that only work for one single spell in the map. GUI users can use hashtables.

And besides, a hashtable is exactly what he is looking for ("double array").
 

Bogrim

y hello thar
Reaction score
154
At least tell him to use a hashtable instead of ugly workarounds that only work for one single spell in the map. GUI users can use hashtables.
Yes, I agree that there are better solutions than using custom values for single unit instances, and learning how to use Hashtables and indexing systems would most certainly make the original poster's triggers more efficient. By any means, I encourage to read tutorials and implement systems and learn and study to improve your map. That will increase its playability, its chances of popularity and make it worth the effort.

But the thing is, not everyone works so intensively on mapping. For some people, mapping is just a very casual hobby. People aren't always looking for to learn a new language when coming here, but just want a quick solution to a small problem they ran into while working on their map. Do you understand? You don't need an indexing system or hashtables to make a map. It's optional. That's why everyone can reply to the thread and offer their solutions, then the original poster can choose what he wants to work with. So please don't tell me how I should be helping people.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top