• 🏆 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!

[Trigger] Unitt - A unit take damage

Status
Not open for further replies.
Level 3
Joined
Apr 8, 2009
Messages
63
Hi, i want to know how i can make a generic unit take damage in event, like this

  • Aura des arcanes
    • Event
      • Unit - A unit take damage
I can't do it even with UMSWE, maybe with JASS it's possible to do ?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Is attacked, wont work! ... is attacked include not spelldamage!!

dont know what you meen with 1680 ko will added to your map while using WEU ...

I use this editor for looooong time - and only if turn off my computer without closing the WEU and save the map, i get a map error. Rly dont know what all do with this editor..
 
Level 11
Joined
Feb 16, 2009
Messages
760
XombeR, A unit is attack is NEVER a solution for a damage-detection. This simple trigger here allows you to use teh event in any trigger you want.
  • Damage detect
    • Events
      • Map initialization
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Execution count of (This trigger)) Greater than 1
        • Then - Actions
          • Trigger - Add to [Your trigger] the event (Unit - (Triggering unit) Takes damage)
        • Else - Actions
          • Set TempGroup = (Units in (Playable map area))
          • Unit Group - Pick every unit in TempGroup and do (Trigger - Add to [Your trigger] the event (Unit - (Picked unit) Takes damage))
          • Custom script: call DestroyGroup( udg_TempGroup )
 
Level 3
Joined
Apr 8, 2009
Messages
63
Attacked trigger even if attack miss, and don't work for an triggered critical strike =(

I tryed it before =(

XombeR, A unit is attack is NEVER a solution for a damage-detection. This simple trigger here allows you to use teh event in any trigger you want.
  • Damage detect
    • Events
      • Map initialization
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Execution count of (This trigger)) Greater than 1
        • Then - Actions
          • Trigger - Add to [Your trigger] the event (Unit - (Triggering unit) Takes damage)
        • Else - Actions
          • Set TempGroup = (Units in (Playable map area))
          • Unit Group - Pick every unit in TempGroup and do (Trigger - Add to [Your trigger] the event (Unit - (Picked unit) Takes damage))
          • Custom script: call DestroyGroup( udg_TempGroup )

Ty i'l ltry

Edit : it crashes Warcraft III when a unit take damage =X

  • Aura des arcanes events
    • Events
      • Map initialization
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Real((Execution count of (This trigger)))) Greater than 1.00
        • Then - Actions
          • Trigger - Add to Aura des arcanes <gen> the event (Unit - (Triggering unit) Take damage)
        • Else - Actions
          • Set TempGroup_1 = (Units in (Playable map area))
          • Unit group - Pick every unit in TempGroup_1 and do (Trigger - Add to Aura des arcanes <gen> the event (Unit - (Picked unit) Take damage))
          • Custom script: call DestroyGroup( udg_TempGroup_1 )
Its link to an critical strike aura

  • Aura des arcanes
    • Events
    • Conditions
    • Actions
      • Custom script: local texttag udg_Temp_Text1 = null
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Damage source) has buff Aura des arcanes ) Egal Ã* TRUE
        • Then - Actions
          • Set Aura_des_arcanes = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Aura_des_arcanes lower or equal than* (2 x (Integer((Real((Level of Aura des arcanes for Magissia_Unit))))))
            • Then - Actions
              • Set Temp_pos3 = (Position of (Damage source))
              • Unit - Cause (Damage source) to damage (Triggering unit), dealing ((Damage taken) / 2.00) damage of attack type Sorts and damage type Magique
              • Floating text - Create floating text that reads ((String((Integer(((Damage taken) x 1.50))))) + !) above (Damage source) with Z offset 0.00, using font size 10.00, color (100.00%, 10.00%, 10.00%), and 0.00% transparency
              • Set Temp_Text1 = (Last created floating text)
              • Floating text - Change Temp_Text1: Désactiver permanence
              • Floating text - Set the velocity of Temp_Text1 to 100.00 towards 90.00 degrees
              • Floating text - Change the lifespan of Temp_Text1 to 1.00 seconds
              • Floating text - Change the fading age of Temp_Text1 to 0.50 seconds
              • Wait 1.30 seconds
              • Floating text - Destroy Temp_Text1
              • Custom script: call RemoveLocation( udg_Temp_pos3 )
            • Else - Actions
        • Else - Actions
Edit : I have to turn off trigger then turn on before and after damage or it can make an infint bonus damage loop, it work now =D, thanks you M4stah for da damage detection
 
Last edited:
Status
Not open for further replies.
Top