MUI Help

Inflicted

Currently inactive
Reaction score
63
ah yes, sorry didnt see that.

that would be easier.

but yeah your code looks alright. Best way to know if it works is to test it though ey.
 

vonDarkmoor

New Member
Reaction score
9
Like vypur85 suggested? Is there, by any chance, anything wrong in the code? It's my first time using hashtables and without questioning vonDarkmoor's skills with them, I want to ensure its all good.

haha feel free to question my skills. That was my 1st full on MUI spell i ever made using Hashtables. I just learned about Hashtables for the first time ever like 2 weeks ago.

Is vypur85's trigger MUI? what happens if another player casts the DOT spell before that trigger has run its course? or what if the same caster casts the same spell again on a different unit before the trigger has run through? i ask because it set "TARGET" as the the unit being targeted, wont that variable be replaced every time the spell is cast?

Or is that the concept of a local variable? sry im 100% GUI :p
 

Inflicted

Currently inactive
Reaction score
63
yes it is MUI.

locals are like variables that are created everytime the trigger is run, and is unique to the instance.

so effectively you can have waits etc and still not have any leaks, therefore MUI.

only thing you might not like about locals is that you need to import alot of 'Custom Script' lines to use them.
and in a few cases your entire trigger may consist of these lines, which questions the though of whether it should just be done in Jass. :/
 

vypur85

Hibernate
Reaction score
803
> wont that variable be replaced every time the spell is cast?

TARGET is a localised global. It's considered local and can sustain through waits.


> same caster casts the same spell again on a different unit before...

It even works if you cast on a single unit twice or more. You will have 2 or more sets of separate damage, instead of just 1.


Try it and see for yourself.
 

vonDarkmoor

New Member
Reaction score
9
I understand. The term "local" should have clicked, it just didnt then for some reason. It seems that vypur85's version would be a much more efficient version of the spell, and a lot simpler to actually write than my GUI version.

Quick question: If you want to use jass, does the whole triggering system have to be jass, or can you mix jass and GUI. I know that custom scripts are a mixing of mixing jass into a trigger, but can you have a map that has like 5 or 6 triggers in full jass and 5 or 6 triggers in full GUI?
 

Ashlebede

New Member
Reaction score
43
I know that custom scripts are a mixing of mixing jass into a trigger, but can you have a map that has like 5 or 6 triggers in full jass and 5 or 6 triggers in full GUI?

Yes, we can!

After all, GUI is converted to Jass during map compilation. That involves that GUI triggers are, in fact, Jass. Which means your triggers are all Jass (in your face, GUIers! Haha!). If your triggers are all Jass, you're basically asking if you can use Jass & Jass in the same map. :D

That explains why you can use Jass inside a GUI trigger and make it a "hybrid" trigger, such as the one presented earlier. Custom script is placed "raw" into the trigger upon compilation.
 

Tawnttoo

New Member
Reaction score
36
What about if I used the same code (damage edited) with multiple spells? Would it still work?
 
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