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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top