• 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.

health trigger question

Status
Not open for further replies.
Level 3
Joined
Apr 13, 2009
Messages
49
Could you give a little more info please? Like in what situation?

Constantly or?

  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Set life of Unit to ((Life of Unit <gen>) + 25.00)
This will make it so the Unit gets healed for 25 damage every second.

Change unit to the specified unit you want or unit group

Have Fun

New Trigger:

  • Untitled Trigger 001
    • Events
      • Unit - A unit owned by Player 1 (Red) Begins casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to (Casting unit)
        • Then - Actions
          • Item - Remove (Item carried by (Triggering unit) in slot 1)
          • Item - Remove (Item carried by (Triggering unit) in slot 2)
          • Item - Remove (Item carried by (Triggering unit) in slot 3)
          • Item - Remove (Item carried by (Triggering unit) in slot 4)
          • Item - Remove (Item carried by (Triggering unit) in slot 5)
          • Item - Remove (Item carried by (Triggering unit) in slot 6)
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + 25.00)
        • Else - Actions
          • Do nothing
This trigger makes it that when a unit from Player Red uses an ability that THAT unit will lose all items and heal himself for 25 health.

That's the closest I can get. You can always add extra events for other players if you want, it won't bug the trigger
 
Last edited:
Level 4
Joined
Mar 27, 2009
Messages
66
when they use a ability...it will remove all items from their inventory and heal them for 25 life per item removed
 
Level 3
Joined
Apr 13, 2009
Messages
49
The trigger will work but I think a more experienced person could shorten it but it'll do it's job nevertheless
 
Level 8
Joined
Aug 4, 2008
Messages
279
Easy, create an integer variable named integer.

A unit start the effect of an ability

Abilty equal to (ur spell)

for each integer from 1 to 6 do actions
set integer = integer + 1
loop - remove the item in slot (integer)
set life of casting unit to (life of casting unit - 25)
 
Level 8
Joined
Nov 9, 2008
Messages
502
This will do what you say you want.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Ability
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) has (Item carried by (Triggering unit) in slot (Integer A))) Equal to True
            • Then - Actions
              • Hero - Drop (Item carried by (Triggering unit) in slot (Integer A)) from (Triggering unit)
              • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + 25.00)
            • Else - Actions
It goes through all inv. slots and if there is an item it will drop it and set unit's health to +25
 
Status
Not open for further replies.
Top