Tutorial Making MUI spells in GUI

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
This tutorial is gold worth. It's so simple yet so amazing.

+Rep

Edit: No +rep, gotta spread some love first D:
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
Only one thing came to mind when trying to read through the first post:
"MY GOD AM I GLAD TO BE RID OF GUI" :eek:

Anyhow, nice to see some JASSers around here that still take the time to create stuff for GUI users.

+<3
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Do I sense some hostility towards GUIers? D:

GUi is for us people lazy enough not to bother learning JASS, and this tutorial is about the best thing that has ever happened to GUI triggerers, since making MUI triggers is a pain (in GUI).
 

Flare

Stops copies me!
Reaction score
662
Anyhow, nice to see some JASSers around here that still take the time to create stuff for GUI users.

I'm not really a fully-fledged JASSer (still trying to figure out how to correctly attach stuff to timers with ABC), but thanks anyways.

And I think I made this tutorial before I made a half-decent effort at learning JASS (which failed pretty miserably and discouraged me a bit), and I wanted to share my knowledge (in all it's immense-ness) before I started using JASS fully

Only one thing came to mind when trying to read through the first post:
"MY GOD AM I GLAD TO BE RID OF GUI"

Ye, it's a pretty bulky tutorial but once someone can understand it and knows how to use it, it quickly becomes easy to use and an effective way to fill the MUI gap if people don't want to learn JASS just yet ^^.

To be honest, alot of the tutorial is (kind of) unnecessary (namely the Buffs section, special effects can pretty much cover for buffs if you don't mind not having tooltips :p)

And the Meteor Shower bit too (the metaphorical cookie received for going to the bother of reading through the tutorial i.e. free spell!)

AND the fact that I spelt out practically EVERYTHING in the DPS spell's code, that took up another chunk of space :p



@Larcenist: Hmmm, your Spidey Sense must be f*cked up :p. I can't see any bit of hostility in that post, seems more like a sense of relief :p

And thanks for the 'is about the best thing that has ever happened to GUI triggerers', it's nice to see that people really appreciate it and makes it more worthwhile.
Wouldn't have stuck around the forum for this long otherwise :)
 

Knatten

New Member
Reaction score
7
Hi, just redid my Spellname Floating Text trigger to MUI, and i want you to check it in case of any flaws / leaks. Thanks

Code:
Spellname Show
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Unit-type of (Triggering unit)) Not equal to Wisp
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                CustomValue Less than 500
            Then - Actions
                Set CustomValue = (CustomValue + 1)
            Else - Actions
                Set CustomValue = 1
        Set Caster[CustomValue] = (Triggering unit)
        Floating Text - Create floating text that reads (Name of (Ability being cast)) above Caster[CustomValue] with Z offset 0.00, using font size 7.00, color (50.00%, 100.00%, 50.00%), and 0.00% transparency
        Set Floating_Text[CustomValue] = (Last created floating text)
        Floating Text - Change Floating_Text[CustomValue]: Disable permanence
        Floating Text - Set the velocity of Floating_Text[CustomValue] to 64.00 towards 90.00 degrees
        Floating Text - Change the lifespan of Floating_Text[CustomValue] to 2.50 seconds
        Floating Text - Change the fading age of Floating_Text[CustomValue] to 2.00 seconds
 

Flare

Stops copies me!
Reaction score
662
No leaks, but that was totally unnecessary. If you are just doing one trigger without waits, there's no need to use the stuff from this tut. The stuff in this tut is for avoiding waits and doing periodic events, while making everything MUI

If you were using a periodic trigger to change the floating text in any way, it still wouldn't work (since you have no dummy units and dummy group, you can't refer back to the arrays properly in another trigger), but if that's the only trigger you are using, you're fine
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I've got a question.

If you're playing an AoS for example, and you're using the "same hero" game mode and one of your allies leaves the game and you're granted control of that allies units. If you were to use your allies hero together with yours, would you be counted as the owner of the unit, or the ally who left? I'm remaking all my spells in my AoS (like 100 spells or so...) and I'm unsure if I'll use MUI or just MPI.
 

Slapshot136

Divide et impera
Reaction score
471
id like to request for SUI (same unit instancability) to also be included here, basically to help prevent errors when the same unit casts a spell twice before the spell finishes. (im trying to make a version of chain lightning work like this)
 

Flare

Stops copies me!
Reaction score
662
@slapshot: this tutorial works for SUI :). since you are creating a dummy for each SPELLCAST rather than each unit who is able to cast, theres no major problem

if you tried the MUI DPS demo, you would notice that you can cast twice on the same target using the one caster :)

thanks for suggesting though

@larcenist: unless ownership is changed via trigger, the unit is still owned by the leaver. unless you change ownership to another player, MPI is sufficient.

@both: that what you wanted to hear? ^^
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Good thing to know, you learn something new everyday eh? I'll probably use MUI anyways since IMO it doesn't take as long as entering "Player number of bla bla bla" into each variable. Though it's a long way to go, I'm still at the terraining stage, and I'm truly the worst terrainer ever. Anyway great tutorial once again.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
You as in general, I wouldn't dare to challenge you at a point like that where I've got no clue :S
 

Mr Joke

New Member
Reaction score
2
Ok I tried this and im too stupid to understand it correctly. Could you please help me fix my triggers.

Code:
Untitled Trigger 001
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Build Tiny Farm
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                CustomValue Less than 1000
            Then - Actions
                Set CustomValue = (CustomValue + 1)
            Else - Actions
                Set CustomValue = 1
        Set TEMP_Unit[CustomValue] = (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Life of TEMP_Unit[CustomValue]) Greater than or equal to 100.00
                (Ability being cast) Equal to Build Tiny Farm
            Then - Actions
                Set TEMP_Point = (Position of TEMP_Unit[CustomValue])
                Unit - Set life of TEMP_Unit[CustomValue] to ((Life of TEMP_Unit[CustomValue]) - 100.00)
                Special Effect - Create a special effect at TEMP_Point using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
                Special Effect - Destroy (Last created special effect)
                Custom script:   call RemoveLocation (udg_TEMP_Point)
            Else - Actions
                Unit - Order (Triggering unit) to Stop
                Sound - Play Error <gen>
Code:
Untitled Trigger 002
    Events
        Unit - A unit Cancels construction
    Conditions
        (Unit-type of (Triggering unit)) Equal to Farm
    Actions
        Unit - Set life of TEMP_Unit[CustomValue] to ((Life of TEMP_Unit[CustomValue]) + 100.00)
 

Flare

Stops copies me!
Reaction score
662
pff, only way i can think of fixing that would be a complete re-work of the triggers (there may be another way, but i cant see it)

I can point out some noticeable errors straight away though
1)
Code:
        Unit - Set life of TEMP_Unit[CustomValue] to ((Life of TEMP_Unit[CustomValue]) + 100.00)

Everytime you use Build Tiny Farm, the variable CustomValue will increase. so if someone uses Build Tiny Farm after you use it, then you decide to cancel your construction, the other player's unit will be healed. take a look at the Meteor Shower's end cast trigger. that shows you how to deal with those kind of events where you dont know what specific unit is cancelling.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top