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

Few questions

Status
Not open for further replies.
Level 9
Joined
Aug 1, 2008
Messages
453
i have 3 questions

1. is there a condition that checks if a unit did more than 100 damage to a different unit? or is there one that checks if a unit did more than a 100 damage with a spell?

2. is there an ability that when a unit does more than X damage it does Y damage back to them?

3. is there anyway to take like an icon off wowhead and make it a wc3 icon?

Thanks, will +rep if helped :grin::grin:
 
Last edited:
Level 11
Joined
May 31, 2008
Messages
698
I dont think there is any way to tell how much damage has been given or recieved. I believe there is an event "a unit takes damage", but you have to actually select the unit, aka it has to be on the actual map in World Editor and you cant use a variable.
 
Level 4
Joined
May 4, 2008
Messages
113
i have 3 questions

1. is there a condition that checks if a unit did more than 100 damage to a different unit? or is there one that checks if a unit did more than a 100 damage with a spell?

2. is there an ability that when a unit does more than X damage it does Y damage back to them?

3. is there anyway to take like an icon off wowhead and make it a wc3 icon?

Thanks, will +rep if helped :grin::grin:

Your first two questions are doable, but a little complex. I'll walk you through the process.

There's an event called 'Unit takes Damage' and also an event response ' Damage Taken'. So where is the Takes damage event? Answer: It's not a generic unit even. "Unit takes damage" is a specific unit event, which makes using it in general spells and such quite tricky. So this is how we get around adding the event to a trigger.

Code:
Events
 Unit - A unit enters (Playable map area)

Actions
 Trigger - Add to <YOUR TRIGGER> the event (Entering unit (Takes damage))

NOTE: If a unit enters the playable map area twice, the event will be added twice, and that means the trigger will run twice. If it is possible for units to enter the map twice (being ressurected and such will trigger this), you can adjust that trigger a little:

Code:
Events
 Unit - A unit enters (Playable map area)

Conditions
 (Entering unit) is in DamageTaken Equal to False

Actions
 Add (Entering unit) to DamageTaken
 Add to <YOUR TRIGGER> the event (Entering unit (Takes damage))

DamageTaken is a Unit group variable.

Now, change <YOUR TRIGGER> to the trigger you want to have the 'damage taken' event. Add your conditions and actions and you're done!

2 notes:
1. If you need to get the integer of how much damage was dealt, when entering integers there is a field "Event Response - Damage Taken" in the dropdown menu. Select that.
2. With the "Damage Taken" event, Triggering unit = the unit taking the damage, and Damage source = the unit dealing it.

Hope that helped!
 
Status
Not open for further replies.
Top