Making Spell MUI

ArmyOfFrogs

New Member
Reaction score
20
Soo, map is getting closer to being able to get tested by multiple people, so i'm going through and making spells and triggers MUI, and I came across this one and am having some problems with the timer in it :[

Here's the base trigger

Trigger:
  • toth
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacked unit)) Equal to Player 11 (Dark Green)
      • (Unit-type of (Attacking unit)) Equal to Tyrande
    • Actions
      • Set tothunit[(Player number of (Owner of (Attacking unit)))] = (Attacking unit)
      • Countdown Timer - Start toth_timer[(Player number of (Triggering player))] as a One-shot timer that will expire in 15.00 seconds
      • Trigger - Add to toth timer expire <gen> the event (Time - (Last started timer) expires)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Thrill of the Hunt for (Attacking unit)) Equal to 1
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • tothcount[(Player number of (Owner of (Attacking unit)))] Less than 8
            • Then - Actions
              • Set tothcount[(Player number of (Owner of (Attacking unit)))] = (tothcount[(Player number of (Owner of (Attacking unit)))] + 1)
              • Unit - Add toth 3 to tothunit[(Player number of (Owner of (Attacking unit)))]
              • Unit - Set level of toth 3 for (Attacking unit) to (Level of toth 3 for tothunit[(Player number of (Owner of (Attacking unit)))])
            • Else - Actions
              • Unit - Add toth 3 to tothunit[(Player number of (Owner of (Attacking unit)))]
              • Unit - Set level of toth 3 for (Attacking unit) to (Level of toth 3 for tothunit[(Player number of (Owner of (Attacking unit)))])
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Thrill of the Hunt for (Attacking unit)) Equal to 2
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • tothcount[(Player number of (Owner of (Attacking unit)))] Less than 9
                • Then - Actions
                  • Set tothcount[(Player number of (Owner of (Attacking unit)))] = (tothcount[(Player number of (Owner of (Attacking unit)))] + 1)
                  • Unit - Add toth8 to (Attacking unit)
                  • Unit - Set level of toth8 for tothunit[(Player number of (Owner of (Attacking unit)))] to tothcount[(Player number of (Owner of (Attacking unit)))]
                • Else - Actions
                  • Unit - Add toth8 to (Attacking unit)
                  • Unit - Set level of toth8 for tothunit[(Player number of (Owner of (Attacking unit)))] to tothcount[(Player number of (Owner of (Attacking unit)))]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Thrill of the Hunt for (Attacking unit)) Equal to 3
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • tothcount[(Player number of (Owner of (Attacking unit)))] Less than 10
                    • Then - Actions
                      • Set tothcount[(Player number of (Owner of (Attacking unit)))] = (tothcount[(Player number of (Owner of (Attacking unit)))] + 1)
                      • Unit - Add toth14 to (Attacking unit)
                      • Unit - Set level of toth14 for tothunit[(Player number of (Owner of (Attacking unit)))] to tothcount[(Player number of (Owner of (Attacking unit)))]
                    • Else - Actions
                      • Unit - Add toth14 to (Attacking unit)
                      • Unit - Set level of toth14 for tothunit[(Player number of (Owner of (Attacking unit)))] to tothcount[(Player number of (Owner of (Attacking unit)))]
                • Else - Actions


The timer trigger

Trigger:
  • toth timer expire
    • Events
    • Conditions
    • Actions
      • Unit - Remove toth 3 from Unit
      • Unit - Remove toth8 from Unit
      • Unit - Remove toth14 from Unit
      • Set Variable = 0


See I need a way to access the [(Player Number)] on the timer trigger, but I can't find anyway to do it. Plus I don't think the way i'm setting up the (Last created timer) would work for MUI :[

Thanks if you have the time to read through that and help out ^^
 

windale5

New Member
Reaction score
2
whats difference

sry for being off topic but what the difference between MUI and GUI??
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
MUI Muti Unit Instance : Make ot that many units can cast it at once
GUI Graphical User Interface: Trigger actions and events.
Go read a MUI Guide ArmyofFrogs that will explain exactly how to make it MUI
 

Dregonx

TH.net Regular
Reaction score
21
I'm more then certain that Timers with arrays do not work. (Or they do but there is some complex thing about them AceHart said, or maybe it was timer windows, either way, that's likely your problem.)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, the timer shouldn't work either way:
Code:
Countdown Timer - Start toth_timer[(Player number of [COLOR="Red"](Triggering player)[/COLOR])] as a One-shot timer that will expire in 15.00 seconds

No Triggering player XD

And for this, you'd probably need a timer sttachment system, though I'm not good with vJASS, so can't guide you to a good one :(
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Array are always used in gui to make it mui.
 

ArmyOfFrogs

New Member
Reaction score
20
Guys i know it doesn't work ._. It used to just be using a single variable and I changed them to arrays so that I could make it MUI. The problem is I can't find out how to set up the timer portion.

The spell adds attack speed each attack, to a maximum, and it expires after 15 seconds of having not attacked anything. However I can't set up the expiration because I'm not sure how i'm supposed to link those timers to the ones created. o_O Going to read the guide you posted though.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Wasting time on making a spell MUI, I rather use these time to learn Jass and make it MUI as easy as ABC...
 

Ayanami

칼리
Reaction score
288
Instead of using a timer, you could do a periodic trigger every 0.03 seconds to set an integer as (Integer - 0.03), so that you can check the time expiration time?
 

deebee

New Member
Reaction score
15
Replace:
Trigger:
  • Countdown Timer - Start toth_timer[(Player number of (Triggering player))] as a One-shot timer that will expire in 15.00 seconds


With:
Trigger:
  • Countdown Timer - Start toth_timer[(Player number of (Owner of (Attacking unit)))] as a One-shot timer that will expire in 15.00 seconds


Remove:
Trigger:
  • Trigger - Add to toth timer expire <gen> the event (Time - (Last started timer) expires)


For toth time expire: Add the events:
Trigger:
  • toth time expire
    • Events
      • Time - toth_timer[1] expires


Problem with the toth time expire trigger is that you may need to create one expire trigger for each player.

Definitely recommend Glenphir's method, much easier to use.
 
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