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

[Trigger] Unique trigger help

Status
Not open for further replies.
Level 2
Joined
Nov 30, 2007
Messages
9
i was wondering if it was possible to make a trigger that made the atk of a monster heal itself like a vampire aura but without the skill....o_O im no good at trigger (can't even make one) so im asking the pors if its possible.
 
Level 8
Joined
Feb 20, 2007
Messages
338
The Condition:

  • (Unit-type of (Attacking unit)) Equal to Peasant
In the trigger edit mode allows you to click on blue dialog to change different aspects of the function:

It looks like this: (Unit-type of (Triggering unit)) Equal to Footman

Unit Type of Triggering unit is one changeable segment
Equal to is another
and Footman (Your Unit, Peasant) is another.

You can change Attacking Unit or Attacked unit

If you need both then your condition would have to use the OR Multiple functions.

It would look like this:
  • Vampire Life Steal
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Attacked unit)) Equal to Footman
          • (Unit-type of (Attacking unit)) Equal to Footman
    • Actions
OR must be used because the Attacked and the Attacking can not be the same unit at the same time.

If you did not use OR the computer would read both conditions as an And - meaning it would expect the two conditions to be taking place at the same time.
If you want something slightly different to happen depending on if the unit is attacked or if it is the attacker then you would use the If/Then Else multiple conditions (under Multiple functions):

  • Vampire Life Steal
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacked unit)) Equal to Footman
        • Then - Actions
          • Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + 10.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacking unit)) Equal to Footman
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 25.00)
        • Else - Actions
In this case if the footman is attacked he only gets 10 hit points.
If the footman attacks he gets 25 hit points.

In this case all of the conditions fall under the If/Then/Else functions/conditions.

You can set it to any unit you want, or how much HP is "taken".

You can also add to that a "drain" function. Where you would set in the Attacked part of the trigger the "set life of (attacking) unit as a minus. And in the Attacking part it would be the attacked unit that you are draining.

Did that make sense?

One more look with the new actions:

  • Vampire Life Steal
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Attacking unit)) Equal to Footman
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacked unit)) Equal to Footman
        • Then - Actions
          • Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + 10.00)
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 10.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacking unit)) Equal to Footman
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 25.00)
          • Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) - 25.00)
        • Else - Actions
In essence your vampiric unit (that gains life from an attack or when attacked) "drains" life from the enemy unit.
 
Status
Not open for further replies.
Top