how do i make this mui?

AKDevil

New Member
Reaction score
1
How Do i make this MUI? just trying to make it revive dead heroes with a timer.


Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • (Player number of (Owner of (Dying unit))) Greater than or equal to 3
      • (Player number of (Owner of (Dying unit))) Less than or equal to 12
    • Actions
      • Countdown Timer - Start ReviveTimer as a One-shot timer that will expire in ((Real((Hero level of (Dying unit)))) x 5.00) seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Your Revival.
      • Countdown Timer - Show (Last created timer window) for Player 1 (Red)
      • Set Revive_Timer[(Player number of (Owner of (Dying unit)))] = ReviveTimer
      • Wait until ((Remaining time for Revive_Timer[(Player number of (Owner of (Picked unit)))]) Equal to 0.00), checking every 1.00 seconds
      • Countdown Timer - Destroy (Last created timer window)
      • Hero - Instantly revive (Dying unit) at (Center of (Playable map area)), Show revival graphics
 

jig7c

Stop reading me...-statement
Reaction score
123
there is no Picked Unit!
Trigger:
  • Wait until ((Remaining time for Revive_Timer[(Player number of (Owner of (Picked unit)))]) Equal to 0.00), checking every 1.00 seconds



location leak
Trigger:
  • Hero - Instantly revive (Dying unit) at (Center of (Playable map area)), Show revival graphics
 

AKDevil

New Member
Reaction score
1
well i had more, then deleted some, must have forgot that, lol, but stillhow do i make it MUI, and am i on the right track?
 

Carnerox

The one and only.
Reaction score
84
Trigger:
  • set TempPoint = (center of (playable map area)


Trigger:
  • set DyingUnit[Triggering Player] = (Triggering Unit)


Trigger:
  • Wait until ((Remaining time for Revive_Timer[(Owner of (DyingUnit[Triggering player))]) Equal to 0.00), checking every 1.00 seconds


Trigger:
  • call RemoveLocation (udg_TemPoint)


Trigger:
  • Countdown Timer - Show (Last created timer window) for (Owner of (DyiningUnit[Triggering Player]))


Trigger:
  • Countdown Timer - Pause (Revive_Timer[Owner of (DyingUnit[Triggering Player]))
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Trigger:
  • set TempPoint = (center of (playable map area)

Trigger:
  • set DyingUnit[Triggering Player] = (Triggering Unit)

Trigger:
  • Wait until ((Remaining time for Revive_Timer[(Owner of (DyingUnit[Triggering player))]) Equal to 0.00), checking every 1.00 seconds

Trigger:
  • call RemoveLocation (udg_TemPoint)

Trigger:
  • Countdown Timer - Show (Last created timer window) for (Owner of (DyiningUnit[Triggering Player]))

Trigger:
  • Countdown Timer - Pause (Revive_Timer[Owner of (DyingUnit[Triggering Player]))

That isn't MUI, it is MPI. If the OP wants players to have more than one hero at a time, this will not work.
 

Carnerox

The one and only.
Reaction score
84
What makes it not work?

any way I'm not that good at MUI GUI, only jass. :(
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Set DyingUnit[Player number of (Owner of (Triggering unit))] = (Triggering unit)

If you do this, and another hero owned by the same player dies, the variable will be overwritten.

What's more is thati n your example you've used "Triggering player", which is not an integer and therefor cannot be an index, and there is no Triggering player in the event anyway.

As far as actually making the trigger MUI goes, the only way I can think of would be to use JASS.
 

Carnerox

The one and only.
Reaction score
84
JASS:
function Trig_Revive_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local player o = GetOwningPlayer(u)
    local timer t
    local timerdialog d
    local location l = GetRectCenter(GetPlayableMapRect())
    if (IsUnitType(u, UNIT_TYPE_HERO) == true) then
    if (GetConvertedPlayerId(o)) <= 12) then
    if (GetConvertedPlayerId(o)) >= 3) then
    set t = CreateTimer()
    set d = CreateTimerDialog(t)
    call TimerStart (t, (5.00 * (I2R(GetHeroLevel(u)))), false, null)
    call CreateTimerDialog (t)
    call TimerDialogSetTitle (d, "Revive Time.")
    call TimerDialogDisplay (d, true)
    loop
        exitwhen (TimerGetRemaining(t) <= 0.00 )
        call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 1))
    endloop
    call DestroyTimer (t)
    call DestroyTimerDialog (d)
    call ReviveHeroLoc (u, l, true)
    endif
    endif
    endif
    set u=null
    set t=null
    set d=null
    call RemoveLocation (l)
endfunction

function InitTrig_Revive takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ (trig, EVENT_PLAYER_UNIT_DEATH)
    call TriggerAddAction (trig, function Trig_Revive_Actions)
endfunction
 

jig7c

Stop reading me...-statement
Reaction score
123
where is
Trigger:
  • (Player number of (Owner of (Dying unit))) Greater than or equal to 3
    • (Player number of (Owner of (Dying unit))) Less than or equal to 12

in the above script?
 

Chaos_Knight

New Member
Reaction score
39
JASS:
function Trig_Revive_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local player o = GetOwningPlayer(u)
    local timer t
    local timerdialog d
    local location l = GetRectCenter(GetPlayableMapRect())
    if (IsUnitType(u, UNIT_TYPE_HERO) == true) then
    if (GetConvertedPlayerId(o)) <= 12) then
    if (GetConvertedPlayerId(o)) >= 3) then
    set t = CreateTimer()
    set d = CreateTimerDialog(t)
    call TimerStart (t, (5.00 * (I2R(GetHeroLevel(u)))), false, null)
    call CreateTimerDialog (t)
    call TimerDialogSetTitle (d, "Revive Time.")
    call TimerDialogDisplay (d, true)
    loop
        exitwhen (TimerGetRemaining(t) <= 0.00 )
        call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 1))
    endloop
    call DestroyTimer (t)
    call DestroyTimerDialog (d)
    call ReviveHeroLoc (u, l, true)
    endif
    endif
    endif
    set u=null
    set t=null
    set d=null
    call RemoveLocation (l)
endfunction

function InitTrig_Revive takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ (trig, EVENT_PLAYER_UNIT_DEATH)
    call TriggerAddAction (trig, function Trig_Revive_Actions)
endfunction

Hand written?
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
Don't use waits. Especially not for revive timers. ... I mean; you already got the timers, so why not using the expire event instead of buggy conditional waits?
 

jig7c

Stop reading me...-statement
Reaction score
123
the player index needs to be number zero, not the letter o...
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/
  • The Helper The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Sticking with the desserts for now the latest recipe is Fried Apple Pies - https://www.thehelper.net/threads/recipe-fried-apple-pies.194297/
  • The Helper The Helper:
    Finally finding about some of the bots that are flooding the users online - bytespider apparently is a huge offender here - ignores robots.txt and comes in from a ton of different IPs
  • Monovertex Monovertex:
    @The Helper I'm really not seeing the "Signature" link in the sidebar on that page. Here's a screenshot:
  • The Helper The Helper:
    I have reported it - I was wondering why nobody I have given sigs to over the last few years have used them
  • The Helper The Helper:
    Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.
  • The Helper The Helper:
    Here is a better place to manage this stuff https://www.thehelper.net/account/account-details which I think should be way more visible
  • The Helper The Helper:
    I am hoping that online user count drop is finally that TikTok bot banned
  • Ghan Ghan:
    I added the filter last night.
  • The Helper The Helper:
    They are still there

      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