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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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