• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How do i turn this Trigger MUI?

Status
Not open for further replies.
Level 20
Joined
May 16, 2012
Messages
635
  • FEB 1
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has an item of type Fire Edge Blade) Equal to True
    • Actions
      • Set FEB_Counter = (FEB_Counter + 1)
      • Set FEB_Hero = (Attacking unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FEB_Counter Equal to 3
        • Then - Actions
          • Set FEB_Target = (Attacked unit)
          • Special Effect - Create a special effect attached to the origin of FEB_Target using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
          • Unit - Cause FEB_Hero to damage FEB_Target, dealing (15000.00 x (Real((Hero level of FEB_Hero)))) damage of attack type Hero and damage type Fire
          • Special Effect - Destroy (Last created special effect)
          • Set FEB_Counter = 0
        • Else - Actions
  • FEB 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to FEB_Target
    • Actions
      • Wait 1.00 seconds
      • Set Wave_Point = (Position of FEB_Target)
      • Set FEB_Target = (Random unit from (Units within 1000.00 of Wave_Point matching (((Matching unit) belongs to an ally of (Owner of FEB_Target)) Equal to True)))
      • Set GW_Group = (Last created unit group)
      • Special Effect - Create a special effect attached to the origin of FEB_Target using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
      • Unit - Cause FEB_Hero to damage FEB_Target, dealing (15000.00 x (Real((Hero level of FEB_Hero)))) damage of attack type Hero and damage type Fire
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call DestroyGroup(udg_GW_Group)
      • Custom script: call RemoveLocation(udg_Wave_Point)
If possible, how to use jass to make this trigger MUI.
 
Last edited by a moderator:
By using an local unit you can take the attacker over the wait so you could fuse the triggers to one.

A local unit is only known in the current trigger run. Outside it does not exist.

  • local attacker
    • Ereignisse
      • Einheit - A unit Wird angegriffen
    • Bedingungen
    • Aktionen
      • Custom script: local unit udg_Attacker
      • Set Attacker = (Attacking unit)
      • Wait 1.00 seconds
      • -------- still the same unit --------
      • -------- Clean unit- handle --------
      • Set Attacker = Keine Einheit
If your "Fireblade-Item" does not use charges you could use the item charges to count for procing the effect.

This might a possible solution of making it mui, be aware not use "locals" in an if conditon.

To use a local var, you need to Create the same var with the var-Editor (crtl +B)

  • FEB Attack
    • Events
      • Unit - A unit is Attacked
    • Conditions
      • ((Attacking unit) has an item of type Fireblade) equal True
    • Aktionen
      • Custom script: local unit udg_Attacker
      • Set Attacker = (Attacking unit)
      • Set Counts = (Charges remaining in (Item carried by Attacker of type Fireblade))
      • Gegenstand - Set charges remaining in (Item carried by Attacker of type Fireblade) to (Counts + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Condtions
          • Counts equal 3
        • 'THEN'-Actions
          • Gegenstand - Set charges remaining in (Item carried by Attacker of type Fireblade) to 0
          • -------- your Effect --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • ((Triggering unit) is dead) equal True
            • 'THEN'-Actions
              • Wait 1.00 seconds
              • -------- Do your Second Target DMG Stuff --------
              • -------- By using (Triggering unit) you gain a system free local unit, representing the attacked unit--------
            • 'ELSE'-Actions
        • 'ELSE'-Aktionen
      • Set Attacker = no Unit
 
Level 20
Joined
May 16, 2012
Messages
635
By using an local unit you can take the attacker over the wait so you could fuse the triggers to one.

A local unit is only known in the current trigger run. Outside it does not exist.

  • local attacker
    • Ereignisse
      • Einheit - A unit Wird angegriffen
    • Bedingungen
    • Aktionen
      • Custom script: local unit udg_Attacker
      • Set Attacker = (Attacking unit)
      • Wait 1.00 seconds
      • -------- still the same unit --------
      • -------- Clean unit- handle --------
      • Set Attacker = Keine Einheit
If your "Fireblade-Item" does not use charges you could use the item charges to count for procing the effect.

This might a possible solution of making it mui, be aware not use "locals" in an if conditon.

To use a local var, you need to Create the same var with the var-Editor (crtl +B)

  • FEB Attack
    • Events
      • Unit - A unit is Attacked
    • Conditions
      • ((Attacking unit) has an item of type Fireblade) equal True
    • Aktionen
      • Custom script: local unit udg_Attacker
      • Set Attacker = (Attacking unit)
      • Set Counts = (Charges remaining in (Item carried by Attacker of type Fireblade))
      • Gegenstand - Set charges remaining in (Item carried by Attacker of type Fireblade) to (Counts + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Condtions
          • Counts equal 3
        • 'THEN'-Actions
          • Gegenstand - Set charges remaining in (Item carried by Attacker of type Fireblade) to 0
          • -------- your Effect --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • ((Triggering unit) is dead) equal True
            • 'THEN'-Actions
              • Wait 1.00 seconds
              • -------- Do your Second Target DMG Stuff --------
              • -------- By using (Triggering unit) you gain a system free local unit, representing the attacked unit--------
            • 'ELSE'-Actions
        • 'ELSE'-Aktionen
      • Set Attacker = no Unit


Thx a lot man!
 
Status
Not open for further replies.
Top