[Spell] Help with hashtables and MUI

Status
Not open for further replies.
Level 1
Joined
Mar 3, 2021
Messages
1
Hey, I usually use arrays to make my spells MUI, however I wanted to check out hashtables recently, since working with the handle ID of things seems like it could be very useful in a lot of cases. Arrays can also become a bit of a pain to deal with, especially if multi arrays are needed.

Hence I have read both A Complete Beginners Guide to Hashtables and Hashtables and MUI

I had no particular issue understanding those, however the examples given in them are very rudimentary and now, while trying to make a slightly more complex spell with this method, I'm a bit stuck.

Here is the spell I want recreate with hashtables to be MUI (I intentionally removed anything that isn't 100% necessary including cleaning leaks for better visibility):

unknown.png

unknown.png


My first and I suppose central problem right now is how to save the caster so it can be referenced in the loop. So any tips on that would be appreciated.

Even better would be if someone could actually make me a version of this spell with hashtables and in MUI, so I can look at it and see directly how it could be done. Or maybe if someone could just link to a spell on Hive that is somewhat similar in nature.

I will also attach a testmap that contains what is shown in the screenshots.
 

Attachments

  • hash_mui_example.w3x
    467.1 KB · Views: 26
Level 15
Joined
Jul 12, 2018
Messages
560
Hashtable: Save unit handle is a GUI action, and then Hashtable - load unit handle to reference it.

the hashtable has to already be created when you do this of course, i create my hashtables in one of the init triggers that run at the start of the map.
 
Status
Not open for further replies.
Top