• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Trigger needs Fix so it can become MUI

Status
Not open for further replies.
Level 11
Joined
Dec 5, 2009
Messages
846
Hello how to make this trigger MUI ? :) I new to MUI and im trying to learn. But I can't get the floating text to work.



  • Untitled Trigger 002
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set Integer = (Integer + 1)
      • Set Unit1[Integer] = (Attacking unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit1[Integer] has buff Command Aura) Equal to True
        • Then - Actions
          • Unit - Order Unit1[Integer] to Stop
        • Else - Actions
          • Set FloatingInt = (FloatingInt + 1)
          • Unit - Add Command Aura to Unit1[Integer]
          • Floating Text - Create floating text that reads III above Unit1[Integer] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set Floatingtext[FloatingInt] = (Last created floating text)
          • Trigger - Run Untitled Trigger 001 <gen> (checking conditions)
          • Unit - Remove Command Aura from Unit1[Integer]
  • Untitled Trigger 003
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Floating Text - Change the position of Floatingtext[FloatingInt] to Unit1[Integer] with Z offset 0.00
I know i can't use waits in a MUI trigger.. But i didn't have any idea how to make this so i just gave it a try :p

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Wait 1.00 seconds
      • Floating Text - Change text of Floatingtext[FloatingInt] to II using font size 10.00
      • Wait 1.00 seconds
      • Floating Text - Change text of Floatingtext[FloatingInt] to I using font size 10.00
      • Wait 1.00 seconds
      • Floating Text - Destroy Floatingtext[FloatingInt]
BTW: When i add and remove the command aura like that with no waits between it will still take 3 seconds until its gone.
 
Level 11
Joined
Dec 5, 2009
Messages
846
I want it like this. When a unit attacks another unit. The attacking unit will get a counter III seconds. While its counting he can't attack. But when the count is over then he can attack again.
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
'He can't attack' You mean targets or the guy who is attacking?

EDIT: i edited man around disable for attaked units. Man you havent discribed what you wanted, and in my opinion idea with command aura as condition is wierd, but i did spell around your wishes.
 

Attachments

  • TextMUI.w3x
    15.5 KB · Views: 53
Last edited:
Level 11
Joined
Dec 5, 2009
Messages
846
I just used the command aura as the counter. Like if the unit doesn't have command aura let him attack if he has command aura then stop the attack. And its the attacking unit that can't attack.
 
Level 11
Joined
Dec 5, 2009
Messages
846
No xD I want simply. When the mage attacks. He will get a timer and when that timer is counting the mage can't attack. When the timer disappears he can attack again. Its just like a cooldown (but made in triggers) I will use this for spells etc. That's why i need this.
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
Thats so easy with what i have done laready that you should do this in a sec, but okey i will post in a sec.

EDIT: remeber it occurs whenever mage attacks so its a loop > he can't attac ^^. Oh man you could just change attacking unit to attacked unit and problem fixed, post it you want something more within this trigger.
 

Attachments

  • TextMUI.w3x
    15.5 KB · Views: 30
Level 26
Joined
Mar 19, 2008
Messages
3,140
Man it's so simple to revamp this trigg into your imagination. Just add trigger with event 'unit enters playable map area' that adds any kind of unit you want to be protected via trigger to e.g ProtectedGroup. and use condition: attacked unit is in ProtectedGroup in protecting trigger.

Post what you want and i gonna make whole trigger. I though you realised that that mage is just an example and there is nothing that stands against adding many units to that protecting trigger.
 
Status
Not open for further replies.
Top