• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Trigger] How to make MUI

Status
Not open for further replies.
Level 9
Joined
Aug 1, 2008
Messages
453
How would i make this trigger MUI so it wouldn't bug if you click on more than 1 mine at a time. And i know it leaks.


  • Detonate Mine
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Goblin Land Mine
      • (Owner of (Triggering unit)) Equal to (Owner of (Triggering unit))
    • Actions
      • Unit - Add a 3.00 second Generic expiration timer to (Triggering unit)
      • Selection - Select Player[(Player number of (Triggering player))]
      • Floating Text - Create floating text that reads 3 at ((Position of (Triggering unit)) offset by (0.00, 0.00)) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
      • Wait 1.00 seconds
      • Floating Text - Change text of (Last created floating text) to 2 using font size 10.00
      • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
      • Wait 1.00 seconds
      • Floating Text - Change text of (Last created floating text) to 1 using font size 10.00
      • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
      • Wait 1.00 seconds
      • Floating Text - Destroy (Last created floating text)
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
EDIT: Remade whole trigger.

Copy this into your Map Custom Script
JASS:
function TimerTag takes unit target, integer time returns nothing
    local integer i = 0        
    local texttag q = CreateTextTag()
    call SetTextTagPosUnit(q, target, 10.00)
    call SetTextTagPermanent( q, false )
    call SetTextTagColor(q, 255, 155, 100, 255)
    call SetTextTagLifespan(q, time)
    call SetTextTagVisibility(q, true)
    loop
    exitwhen i==time
        call SetTextTagText(q, I2S(time - i), 0.046)
        call PolledWait(1)
        set i = i + 1
    endloop
    call SetWidgetLife(target, -1)
    set q = null
endfunction

  • FloatingText
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • -------- Add whatever Conditions you need --------
      • -------- You can call TimerTag function like this; First argument is unit which will get his text while second is his lifespan --------
      • Custom script: call TimerTag(GetTriggerUnit(), 3)
 
Last edited:
Status
Not open for further replies.
Top