• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Help]Item Degeneration that do NOT kill a unit

Status
Not open for further replies.
Level 11
Joined
Aug 1, 2009
Messages
714
Example: Item Degeneration that do NOT kill the unit wearing it.

I know, I know that this item was from DOTA but I am just experimenting items on my own so this is my question.
I wonder what ability or trigger did he use to make this item have a degeneration. I have tried unholy aura and item hit point regeneration but it kills the user. Can someone help me?

Edit: Also I have tried Disease Cloud but I don't like it.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Unit acquires an item
Item type of manipulated item equal to...
Add triggering unit into a unit group
Turn on looping trigger

------------

Every x.xx seconds of time
Pick all units in group
If life - degeneration > ~1
Set life to life - degeneration
else
set life to 1

---------------

Unit loses an item
Item type == x
Remove unit from group
if group empty then turn off looping trigger
 
Level 11
Joined
Aug 1, 2009
Messages
714
  • Glove of Promotos Degeneration
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has an item of type Glove of Promotos (|c00ff0000On|r)) Equal to True)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of (Picked unit)) Greater than or equal to 10.00
            • Then - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1.00)
            • Else - Actions
Is this ok?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240

  • Untitled Trigger 066
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
    • Actions
      • Unit Group - Add (Triggering unit) to group
      • Trigger - Turn on Untitled Trigger 067 <gen>
  • Untitled Trigger 067
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Life of (Picked unit)) - 10.00) Greater than 1.00
            • Then - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 10.00)
            • Else - Actions
              • Unit - Set life of (Picked unit) to 1.00
  • Untitled Trigger 066 Copy
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
    • Actions
      • Unit Group - Remove (Triggering unit) from group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off Untitled Trigger 067 <gen>
        • Else - Actions
 
Status
Not open for further replies.
Top